Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(components_e2e): gate voice status assertion behind voice feature

Steven Enamakel358138c0ee88
diff --git a/tests/components_e2e.rs b/tests/components_e2e.rs
index 5d95dd8679..b405005105 100644
--- a/tests/components_e2e.rs
+++ b/tests/components_e2e.rs
@@ -85,12 +85,16 @@ fn disabled_component_answers_component_disabled_over_json_rpc() {
);
// The voice namespace answers the same typed error.
- let voice = rpc(&base, "openhuman.voice_status").await;
- assert_eq!(
- voice.pointer("/error/message").and_then(Value::as_str),
- Some("COMPONENT_DISABLED:voice"),
- "{voice}"
- );
+ // (The `voice` family is only registered with the Cargo `voice` gate.)
+ #[cfg(feature = "voice")]
+ {
+ let voice = rpc(&base, "openhuman.voice_status").await;
+ assert_eq!(
+ voice.pointer("/error/message").and_then(Value::as_str),
+ Some("COMPONENT_DISABLED:voice"),
+ "{voice}"
+ );
+ }
// `modules.list` reports the same module as Disabled, and only it.
let listed = rpc(&base, "openhuman.modules_list").await;