diff --git a/crates/worker/Cargo.toml b/crates/worker/Cargo.toml index 2f0a04a9..3b2eb057 100644 --- a/crates/worker/Cargo.toml +++ b/crates/worker/Cargo.toml @@ -19,6 +19,9 @@ clap = { version = "4", features = ["derive"] } anyhow = { workspace = true } uuid = { workspace = true } +[features] +test-utils = [] + [dev-dependencies] willow-network = { path = "../network", features = ["test-utils"] } async-trait = { workspace = true } diff --git a/crates/worker/src/config.rs b/crates/worker/src/config.rs index b8bef856..9a1a3305 100644 --- a/crates/worker/src/config.rs +++ b/crates/worker/src/config.rs @@ -15,6 +15,7 @@ pub struct WorkerConfig { pub allocation: AllocationStrategy, } +#[cfg(any(test, feature = "test-utils"))] impl WorkerConfig { /// Create a config for testing. pub fn test_config() -> Self {