Skip to content

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

fix(tests): add end-to-end test for MCP registry

Steven Enamakel6b679a1a0c78
diff --git a/tests/mcp_registry_e2e.rs b/tests/mcp_registry_e2e.rs
index f6a53b3226..a28fbe2a70 100644
--- a/tests/mcp_registry_e2e.rs
+++ b/tests/mcp_registry_e2e.rs
@@ -382,6 +382,17 @@ async fn set_enabled_false_disconnects_running_server() {
let loaded = h.dynamic().store().get_server(&server.server_id).unwrap();
assert!(!loaded.enabled);
+ // The `enabled` flag and the `disabled` status string are both derived from
+ // the store record, so on their own they would not catch a connection that
+ // survived the toggle. Disabling a running server must drop the live
+ // connection too.
+ assert!(
+ !h.dynamic()
+ .connections()
+ .is_connected(&server.server_id)
+ .await,
+ "disabling a running server must drop its live connection"
+ );
let statuses = h.dynamic().status().await.expect("status");
let mine = statuses
.iter()