Skip to content

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

test(composio): update tool handler tests

Steven Enamakelb86538d80718
diff --git a/crates/openhuman-core/src/integrations/composio/schemas/handlers_tools_tests.rs b/crates/openhuman-core/src/integrations/composio/schemas/handlers_tools_tests.rs
index df60118d3d..33d4706531 100644
--- a/crates/openhuman-core/src/integrations/composio/schemas/handlers_tools_tests.rs
+++ b/crates/openhuman-core/src/integrations/composio/schemas/handlers_tools_tests.rs
@@ -6,7 +6,7 @@ fn execute_parser_trims_tool_preserves_optional_values_and_ignores_unknown_keys(
let params = Map::from_iter([
("tool".into(), json!(" GMAIL_SEND_EMAIL ")),
("arguments".into(), json!(42)),
- ("connection_id".into(), json!("")),
+ ("connection_id".into(), json!(" conn-1 ")),
("unrecognized".into(), json!(true)),
]);
@@ -15,9 +15,21 @@ fn execute_parser_trims_tool_preserves_optional_values_and_ignores_unknown_keys(
ExecuteParams {
tool: "GMAIL_SEND_EMAIL".into(),
arguments: Some(json!(42)),
- connection_id: Some(String::new()),
+ connection_id: Some(" conn-1 ".into()),
}
);
+
+ let blank_connection = Map::from_iter([
+ ("tool".into(), json!("GMAIL_SEND_EMAIL")),
+ ("connection_id".into(), json!("")),
+ ]);
+ assert_eq!(
+ parse_execute(blank_connection)
+ .unwrap()
+ .connection_id
+ .as_deref(),
+ Some("")
+ );
}
#[test]