Add rand feature to tests where required

This commit is contained in:
Ivan Boldyrev
2023-10-10 18:00:36 +04:00
parent 50ec01cc31
commit fe1b8b7b8f
17 changed files with 19 additions and 5 deletions

View File

@ -39,7 +39,7 @@ libp2p-mplex = { path = "../muxers/mplex" } # Using `path` he
libp2p-noise = { path = "../transports/noise" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
multihash = { workspace = true, features = ["arb"] }
quickcheck = { workspace = true }
libp2p-identity = { workspace = true, features = ["ed25519"] }
libp2p-identity = { workspace = true, features = ["ed25519", "rand"] }
[features]
serde = ["multihash/serde-codec", "dep:serde", "libp2p-identity/serde"]

View File

@ -32,6 +32,9 @@ libp2p-swarm = { workspace = true }
once_cell = "1.18.0"
prometheus-client = { version = "0.21.2"}
[dev-dependencies]
libp2p-identity = { workspace = true, features = ["rand"] }
# Passing arguments to the docsrs builder in order to properly document cfg's.
# More information: https://docs.rs/about/builds#cross-compiling
[package.metadata.docs.rs]

View File

@ -28,6 +28,7 @@ async-std = { version = "1.7.0", features = ["attributes"] }
criterion = "0.5"
env_logger = "0.10"
futures = "0.3"
libp2p-identity = { workspace = true, features = ["rand"] }
libp2p-muxer-test-harness = { path = "../test-harness" }
libp2p-plaintext = { workspace = true }
libp2p-tcp = { workspace = true, features = ["async-io"] }

View File

@ -47,6 +47,7 @@ async-std = { version = "1.6.3", features = ["unstable"] }
env_logger = "0.10.0"
hex = "0.4.2"
libp2p-core = { workspace = true }
libp2p-identity = { workspace = true, features = ["rand"] }
libp2p-yamux = { workspace = true }
libp2p-noise = { workspace = true }
libp2p-swarm-test = { path = "../../swarm-test" }

View File

@ -39,6 +39,7 @@ async-std = { version = "1.12.0", features = ["attributes"] }
env_logger = "0.10.0"
futures-timer = "3.0"
libp2p-identify = { path = "../identify" }
libp2p-identity = { workspace = true, features = ["rand"] }
libp2p-noise = { workspace = true }
libp2p-swarm = { path = "../../swarm", features = ["macros"] }
libp2p-swarm-test = { path = "../../swarm-test" }

View File

@ -35,6 +35,7 @@ void = "1"
[dev-dependencies]
rand = "0.8"
libp2p-identity = { workspace = true, features = ["rand"] }
libp2p-swarm-test = { path = "../../swarm-test" }
# Passing arguments to the docsrs builder in order to properly document cfg's.

View File

@ -31,6 +31,7 @@ void = "1"
[dev-dependencies]
env_logger = "0.10.0"
libp2p-identity = { workspace = true, features = ["rand"] }
libp2p-ping = { workspace = true }
libp2p-plaintext = { workspace = true }
libp2p-swarm = { workspace = true, features = ["macros", "async-std"] }

View File

@ -23,6 +23,7 @@ smallvec = "1.11.1"
[dev-dependencies]
env_logger = "0.10"
libp2p-identity = { workspace = true, features = ["rand"] }
tokio-crate = { package = "tokio", version = "1.0", default-features = false, features = ["rt", "time"] }
async-std-crate = { package = "async-std", version = "1.6" }

View File

@ -36,6 +36,7 @@ snow = { version = "0.9.2", features = ["default-resolver"], default-features =
env_logger = "0.10.0"
futures_ringbuf = "0.4.0"
quickcheck = { workspace = true }
libp2p-identity = { workspace = true, features = ["rand"] }
# Passing arguments to the docsrs builder in order to properly document cfg's.
# More information: https://docs.rs/about/builds#cross-compiling

View File

@ -22,7 +22,7 @@ unsigned-varint = { version = "0.7", features = ["asynchronous_codec"] }
[dev-dependencies]
env_logger = "0.10.0"
libp2p-identity = { workspace = true, features = ["ed25519"] }
libp2p-identity = { workspace = true, features = ["ed25519", "rand"] }
quickcheck = { workspace = true }
rand = "0.8"
futures_ringbuf = "0.4.0"

View File

@ -20,7 +20,7 @@ pin-project = "1.1.3"
[dev-dependencies]
libp2p-core = { workspace = true }
libp2p-identity = { workspace = true, features = ["ed25519", "rsa", "ecdsa","secp256k1"] }
libp2p-identity = { workspace = true, features = ["ed25519", "rsa", "ecdsa","secp256k1", "rand"] }
libp2p-noise = { workspace = true }
libp2p-swarm = { workspace = true, features = ["tokio"] }
libp2p-tcp = { workspace = true, features = ["tokio"] }

View File

@ -41,6 +41,7 @@ rustc-args = ["--cfg", "docsrs"]
[dev-dependencies]
async-std = { version = "1.12.0", features = ["attributes"] }
env_logger = "0.10.0"
libp2p-identity = { workspace = true, features = ["rand"] }
libp2p-muxer-test-harness = { path = "../../muxers/test-harness" }
libp2p-noise = { workspace = true }
libp2p-tcp = { workspace = true, features = ["async-io"] }

View File

@ -28,6 +28,7 @@ async-io = ["dep:async-io", "if-watch/smol"]
[dev-dependencies]
async-std = { version = "1.6.5", features = ["attributes"] }
libp2p-identity = { workspace = true, features = ["rand"] }
tokio = { version = "1.33.0", default-features = false, features = ["full"] }
env_logger = "0.10.0"

View File

@ -30,7 +30,7 @@ features = ["dangerous_configuration"] # Must enable this to allow for custom ve
hex = "0.4.3"
hex-literal = "0.4.1"
libp2p-core = { workspace = true }
libp2p-identity = { workspace = true, features = ["ed25519", "rsa", "secp256k1", "ecdsa"] }
libp2p-identity = { workspace = true, features = ["ed25519", "rsa", "secp256k1", "ecdsa", "rand"] }
libp2p-swarm = { workspace = true, features = ["tokio"] }
libp2p-yamux = { workspace = true }
tokio = { version = "1.33.0", features = ["full"] }

View File

@ -39,6 +39,7 @@ pem = ["webrtc?/pem"]
[dev-dependencies]
env_logger = "0.10"
libp2p-identity = { workspace = true, features = ["rand"] }
tokio = { version = "1.33", features = ["full"] }
quickcheck = "1.0.3"

View File

@ -32,4 +32,4 @@ rustc-args = ["--cfg", "docsrs"]
[dev-dependencies]
libp2p-yamux = { workspace = true }
libp2p-noise = { workspace = true }
libp2p-identity = { workspace = true }
libp2p-identity = { workspace = true, features = ["rand"] }

View File

@ -27,6 +27,7 @@ webpki-roots = "0.25"
[dev-dependencies]
libp2p-tcp = { workspace = true, features = ["async-io"] }
libp2p-dns = { workspace = true, features = ["async-std"] }
libp2p-identity = { workspace = true, features = ["rand"] }
async-std = { version = "1.6.5", features = ["attributes"] }
rcgen = "0.10.0"