Skip to content

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

chore(tests): add composio and pricing client tests

Steven Enamakel952665c6222b
diff --git a/crates/openhuman-core/src/integrations/composio/client_tests.rs b/crates/openhuman-core/src/integrations/composio/client_tests.rs
index 5f21887512..b0ee220836 100644
--- a/crates/openhuman-core/src/integrations/composio/client_tests.rs
+++ b/crates/openhuman-core/src/integrations/composio/client_tests.rs
@@ -459,23 +459,6 @@ async fn direct_connected_integrations_fetches_schemas_without_backend_composio_
assert_eq!(backend_tool_requests.load(Ordering::SeqCst), 0);
}
-#[tokio::test]
-async fn pricing_for_config_short_circuits_in_direct_mode() {
- // Build a client pointed at an unreachable backend — if the
- // short-circuit fires, we never actually attempt the network call
- // and the empty default struct comes back immediately.
- let client =
- crate::integrations::IntegrationClient::new("http://127.0.0.1:0".into(), "test".into());
- let mut config = crate::config::Config::default();
- config.composio.mode = "direct".into();
-
- let pricing = crate::integrations::pricing_for_config(&client, &config).await;
- // The default struct has every per-integration entry as `None`.
- assert!(pricing.integrations.google_places.is_none());
- assert!(pricing.integrations.parallel.is_none());
- assert!(pricing.integrations.tinyfish.is_none());
-}
-
// ── failure messages stay byte-identical to the pre-module client ─────────
#[tokio::test]
diff --git a/crates/openhuman-tinyhumans/src/integrations/client/pricing_tests.rs b/crates/openhuman-tinyhumans/src/integrations/client/pricing_tests.rs
index 015e7244f7..fc0d6cba14 100644
--- a/crates/openhuman-tinyhumans/src/integrations/client/pricing_tests.rs
+++ b/crates/openhuman-tinyhumans/src/integrations/client/pricing_tests.rs
@@ -59,3 +59,20 @@ fn missing_or_blank_credential_builds_no_client() {
)
.is_none());
}
+
+#[tokio::test]
+async fn pricing_for_config_short_circuits_in_direct_mode() {
+ // Build a client pointed at an unreachable backend — if the
+ // short-circuit fires, we never actually attempt the network call
+ // and the empty default struct comes back immediately.
+ let client =
+ IntegrationClient::new("http://127.0.0.1:0".into(), "test".into());
+ let mut config = openhuman_embed::__host::config::Config::default();
+ config.composio.mode = "direct".into();
+
+ let pricing = pricing_for_config(&client, &config).await;
+ // The default struct has every per-integration entry as `None`.
+ assert!(pricing.integrations.google_places.is_none());
+ assert!(pricing.integrations.parallel.is_none());
+ assert!(pricing.integrations.tinyfish.is_none());
+}