Skip to content

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

fix(test): simplify schema count assertion in controller test

Steven Enamakel8756131e41bd
diff --git a/crates/openhuman-core/src/core/all_tests.rs b/crates/openhuman-core/src/core/all_tests.rs
index a20621b0fb..5139bacfb8 100644
--- a/crates/openhuman-core/src/core/all_tests.rs
+++ b/crates/openhuman-core/src/core/all_tests.rs
@@ -204,11 +204,9 @@ fn all_controller_schemas_matches_registered_count() {
.iter()
.filter(|g| group_allowed(g.group) && capability_allowed_in(caps, g.capability))
.collect();
- let schemas = visible
- .iter()
- .filter(|g| !g.controller.schema.function.is_empty());
+ let schemas = visible.iter().map(|g| &g.controller.schema).count();
let controllers = visible.len();
- assert_eq!(schemas.count(), controllers);
+ assert_eq!(schemas, controllers);
}
/// With the `voice` feature on (the default), the voice + audio_toolkit