mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-02 16:21:42 +00:00
Add testing feature to validator_client/http_api (#8909)
Create a `testing` feature which we can use to gate off `test_utils.rs` and its associated dependencies from the rest of the crate. Co-Authored-By: Mac L <mjladson@pm.me>
This commit is contained in:
@@ -8,14 +8,17 @@ authors = ["Sigma Prime <contact@sigmaprime.io>"]
|
|||||||
name = "validator_http_api"
|
name = "validator_http_api"
|
||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
testing = ["dep:deposit_contract", "dep:doppelganger_service", "dep:tempfile"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
account_utils = { workspace = true }
|
account_utils = { workspace = true }
|
||||||
beacon_node_fallback = { workspace = true }
|
beacon_node_fallback = { workspace = true }
|
||||||
bls = { workspace = true }
|
bls = { workspace = true }
|
||||||
deposit_contract = { workspace = true }
|
deposit_contract = { workspace = true, optional = true }
|
||||||
directory = { workspace = true }
|
directory = { workspace = true }
|
||||||
dirs = { workspace = true }
|
dirs = { workspace = true }
|
||||||
doppelganger_service = { workspace = true }
|
doppelganger_service = { workspace = true, optional = true }
|
||||||
eth2 = { workspace = true, features = ["lighthouse"] }
|
eth2 = { workspace = true, features = ["lighthouse"] }
|
||||||
eth2_keystore = { workspace = true }
|
eth2_keystore = { workspace = true }
|
||||||
ethereum_serde_utils = { workspace = true }
|
ethereum_serde_utils = { workspace = true }
|
||||||
@@ -38,7 +41,7 @@ slot_clock = { workspace = true }
|
|||||||
sysinfo = { workspace = true }
|
sysinfo = { workspace = true }
|
||||||
system_health = { workspace = true }
|
system_health = { workspace = true }
|
||||||
task_executor = { workspace = true }
|
task_executor = { workspace = true }
|
||||||
tempfile = { workspace = true }
|
tempfile = { workspace = true, optional = true }
|
||||||
tokio = { workspace = true }
|
tokio = { workspace = true }
|
||||||
tokio-stream = { workspace = true }
|
tokio-stream = { workspace = true }
|
||||||
tracing = { workspace = true }
|
tracing = { workspace = true }
|
||||||
@@ -53,7 +56,10 @@ warp_utils = { workspace = true }
|
|||||||
zeroize = { workspace = true }
|
zeroize = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
deposit_contract = { workspace = true }
|
||||||
|
doppelganger_service = { workspace = true }
|
||||||
futures = { workspace = true }
|
futures = { workspace = true }
|
||||||
itertools = { workspace = true }
|
itertools = { workspace = true }
|
||||||
rand = { workspace = true, features = ["small_rng"] }
|
rand = { workspace = true, features = ["small_rng"] }
|
||||||
ssz_types = { workspace = true }
|
ssz_types = { workspace = true }
|
||||||
|
tempfile = { workspace = true }
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
#[cfg(feature = "testing")]
|
||||||
|
pub mod test_utils;
|
||||||
|
|
||||||
mod api_secret;
|
mod api_secret;
|
||||||
mod create_signed_voluntary_exit;
|
mod create_signed_voluntary_exit;
|
||||||
mod create_validator;
|
mod create_validator;
|
||||||
@@ -6,7 +9,6 @@ mod keystores;
|
|||||||
mod remotekeys;
|
mod remotekeys;
|
||||||
mod tests;
|
mod tests;
|
||||||
|
|
||||||
pub mod test_utils;
|
|
||||||
pub use api_secret::PK_FILENAME;
|
pub use api_secret::PK_FILENAME;
|
||||||
|
|
||||||
use graffiti::{delete_graffiti, get_graffiti, set_graffiti};
|
use graffiti::{delete_graffiti, get_graffiti, set_graffiti};
|
||||||
|
|||||||
@@ -29,4 +29,4 @@ beacon_chain = { workspace = true }
|
|||||||
http_api = { workspace = true }
|
http_api = { workspace = true }
|
||||||
regex = { workspace = true }
|
regex = { workspace = true }
|
||||||
tempfile = { workspace = true }
|
tempfile = { workspace = true }
|
||||||
validator_http_api = { workspace = true }
|
validator_http_api = { workspace = true, features = ["testing"] }
|
||||||
|
|||||||
Reference in New Issue
Block a user