Don't pin fake and quickcheck to older versions

This commit is contained in:
Luca Palmieri 2024-08-29 17:42:37 +02:00
parent 2633974039
commit 4e803865f3
3 changed files with 48 additions and 96 deletions

130
Cargo.lock generated
View file

@ -49,7 +49,7 @@ dependencies = [
"mime", "mime",
"percent-encoding", "percent-encoding",
"pin-project-lite", "pin-project-lite",
"rand 0.8.5", "rand",
"sha1", "sha1",
"smallvec", "smallvec",
"tokio", "tokio",
@ -132,7 +132,7 @@ dependencies = [
"actix-web", "actix-web",
"anyhow", "anyhow",
"derive_more", "derive_more",
"rand 0.8.5", "rand",
"redis", "redis",
"serde", "serde",
"serde_json", "serde_json",
@ -282,7 +282,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"getrandom 0.2.15", "getrandom",
"once_cell", "once_cell",
"version_check", "version_check",
"zerocopy", "zerocopy",
@ -626,7 +626,7 @@ dependencies = [
"hkdf", "hkdf",
"hmac", "hmac",
"percent-encoding", "percent-encoding",
"rand 0.8.5", "rand",
"sha2", "sha2",
"subtle", "subtle",
"time", "time",
@ -732,7 +732,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [ dependencies = [
"generic-array", "generic-array",
"rand_core 0.6.4", "rand_core",
"typenum", "typenum",
] ]
@ -796,6 +796,12 @@ dependencies = [
"syn 2.0.76", "syn 2.0.76",
] ]
[[package]]
name = "deunicode"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00"
[[package]] [[package]]
name = "digest" name = "digest"
version = "0.10.7" version = "0.10.7"
@ -834,9 +840,9 @@ dependencies = [
[[package]] [[package]]
name = "env_logger" name = "env_logger"
version = "0.7.1" version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3"
dependencies = [ dependencies = [
"log", "log",
"regex", "regex",
@ -882,11 +888,12 @@ dependencies = [
[[package]] [[package]]
name = "fake" name = "fake"
version = "2.3.0" version = "2.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6479fa2c7e83ddf8be7d435421e093b072ca891b99a49bc84eba098f4044f818" checksum = "1c25829bde82205da46e1823b2259db6273379f626fc211f126f65654a2669be"
dependencies = [ dependencies = [
"rand 0.7.3", "deunicode",
"rand",
] ]
[[package]] [[package]]
@ -1066,17 +1073,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "getrandom"
version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
dependencies = [
"cfg-if",
"libc",
"wasi 0.9.0+wasi-snapshot-preview1",
]
[[package]] [[package]]
name = "getrandom" name = "getrandom"
version = "0.2.15" version = "0.2.15"
@ -1085,7 +1081,7 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"libc", "libc",
"wasi 0.11.0+wasi-snapshot-preview1", "wasi",
] ]
[[package]] [[package]]
@ -1592,7 +1588,7 @@ dependencies = [
"hermit-abi", "hermit-abi",
"libc", "libc",
"log", "log",
"wasi 0.11.0+wasi-snapshot-preview1", "wasi",
"windows-sys 0.52.0", "windows-sys 0.52.0",
] ]
@ -1661,7 +1657,7 @@ dependencies = [
"num-integer", "num-integer",
"num-iter", "num-iter",
"num-traits", "num-traits",
"rand 0.8.5", "rand",
"smallvec", "smallvec",
"zeroize", "zeroize",
] ]
@ -1819,7 +1815,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166"
dependencies = [ dependencies = [
"base64ct", "base64ct",
"rand_core 0.6.4", "rand_core",
"subtle", "subtle",
] ]
@ -1963,21 +1959,20 @@ dependencies = [
[[package]] [[package]]
name = "quickcheck" name = "quickcheck"
version = "0.9.2" version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a44883e74aa97ad63db83c4bf8ca490f02b2fc02f92575e720c8551e843c945f" checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6"
dependencies = [ dependencies = [
"env_logger", "env_logger",
"log", "log",
"rand 0.7.3", "rand",
"rand_core 0.5.1",
] ]
[[package]] [[package]]
name = "quickcheck_macros" name = "quickcheck_macros"
version = "0.9.1" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "608c156fd8e97febc07dc9c2e2c80bf74cfc6ef26893eae3daf8bc2bc94a4b7f" checksum = "b22a693222d716a9587786f37ac3f6b4faedb5b80c23914e7303ff5a1d8016e9"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -2009,7 +2004,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd" checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd"
dependencies = [ dependencies = [
"bytes", "bytes",
"rand 0.8.5", "rand",
"ring", "ring",
"rustc-hash", "rustc-hash",
"rustls", "rustls",
@ -2041,19 +2036,6 @@ dependencies = [
"proc-macro2", "proc-macro2",
] ]
[[package]]
name = "rand"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
dependencies = [
"getrandom 0.1.16",
"libc",
"rand_chacha 0.2.2",
"rand_core 0.5.1",
"rand_hc",
]
[[package]] [[package]]
name = "rand" name = "rand"
version = "0.8.5" version = "0.8.5"
@ -2061,18 +2043,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [ dependencies = [
"libc", "libc",
"rand_chacha 0.3.1", "rand_chacha",
"rand_core 0.6.4", "rand_core",
]
[[package]]
name = "rand_chacha"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
dependencies = [
"ppv-lite86",
"rand_core 0.5.1",
] ]
[[package]] [[package]]
@ -2082,16 +2054,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [ dependencies = [
"ppv-lite86", "ppv-lite86",
"rand_core 0.6.4", "rand_core",
]
[[package]]
name = "rand_core"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
dependencies = [
"getrandom 0.1.16",
] ]
[[package]] [[package]]
@ -2100,16 +2063,7 @@ version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [ dependencies = [
"getrandom 0.2.15", "getrandom",
]
[[package]]
name = "rand_hc"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
dependencies = [
"rand_core 0.5.1",
] ]
[[package]] [[package]]
@ -2266,7 +2220,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d"
dependencies = [ dependencies = [
"cc", "cc",
"cfg-if", "cfg-if",
"getrandom 0.2.15", "getrandom",
"libc", "libc",
"spin", "spin",
"untrusted", "untrusted",
@ -2286,7 +2240,7 @@ dependencies = [
"num-traits", "num-traits",
"pkcs1", "pkcs1",
"pkcs8", "pkcs8",
"rand_core 0.6.4", "rand_core",
"signature", "signature",
"spki", "spki",
"subtle", "subtle",
@ -2549,7 +2503,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
dependencies = [ dependencies = [
"digest", "digest",
"rand_core 0.6.4", "rand_core",
] ]
[[package]] [[package]]
@ -2735,7 +2689,7 @@ dependencies = [
"memchr", "memchr",
"once_cell", "once_cell",
"percent-encoding", "percent-encoding",
"rand 0.8.5", "rand",
"rsa", "rsa",
"serde", "serde",
"sha1", "sha1",
@ -2776,7 +2730,7 @@ dependencies = [
"md-5", "md-5",
"memchr", "memchr",
"once_cell", "once_cell",
"rand 0.8.5", "rand",
"serde", "serde",
"serde_json", "serde_json",
"sha2", "sha2",
@ -3018,7 +2972,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f"
dependencies = [ dependencies = [
"pin-project", "pin-project",
"rand 0.8.5", "rand",
"tokio", "tokio",
] ]
@ -3272,7 +3226,7 @@ version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314"
dependencies = [ dependencies = [
"getrandom 0.2.15", "getrandom",
"serde", "serde",
] ]
@ -3318,12 +3272,6 @@ dependencies = [
"try-lock", "try-lock",
] ]
[[package]]
name = "wasi"
version = "0.9.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
[[package]] [[package]]
name = "wasi" name = "wasi"
version = "0.11.0+wasi-snapshot-preview1" version = "0.11.0+wasi-snapshot-preview1"
@ -3692,7 +3640,7 @@ dependencies = [
"log", "log",
"quickcheck", "quickcheck",
"quickcheck_macros", "quickcheck_macros",
"rand 0.8.5", "rand",
"reqwest", "reqwest",
"secrecy", "secrecy",
"serde", "serde",

View file

@ -52,9 +52,9 @@ actix-session = { version = "0.10", features = ["redis-session-rustls"] }
serde_json = "1" serde_json = "1"
[dev-dependencies] [dev-dependencies]
quickcheck = "0.9.2" quickcheck = "1.0.3"
quickcheck_macros = "0.9.1" quickcheck_macros = "1"
fake = "~2.3.0" fake = "2.9"
wiremock = "0.6" wiremock = "0.6"
serde_json = "1.0.61" serde_json = "1.0.61"
serde_urlencoded = "0.7.1" serde_urlencoded = "0.7.1"

View file

@ -31,6 +31,8 @@ mod tests {
use claims::assert_err; use claims::assert_err;
use fake::faker::internet::en::SafeEmail; use fake::faker::internet::en::SafeEmail;
use fake::Fake; use fake::Fake;
use rand::rngs::StdRng;
use rand::SeedableRng;
#[test] #[test]
fn empty_string_is_rejected() { fn empty_string_is_rejected() {
@ -54,8 +56,10 @@ mod tests {
struct ValidEmailFixture(pub String); struct ValidEmailFixture(pub String);
impl quickcheck::Arbitrary for ValidEmailFixture { impl quickcheck::Arbitrary for ValidEmailFixture {
fn arbitrary<G: quickcheck::Gen>(g: &mut G) -> Self { fn arbitrary(g: &mut quickcheck::Gen) -> Self {
let email = SafeEmail().fake_with_rng(g); let mut rng = StdRng::seed_from_u64(u64::arbitrary(g));
let email = SafeEmail().fake_with_rng(&mut rng);
Self(email) Self(email)
} }
} }