Skip to content

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

test: remove redundant mcp registry integration tests

Steven Enamakel45ced090eff2
diff --git a/tests/mcp_registry_e2e.rs b/tests/mcp_registry_e2e.rs
index 8a010df383..1886819b07 100644
--- a/tests/mcp_registry_e2e.rs
+++ b/tests/mcp_registry_e2e.rs
@@ -99,54 +99,6 @@ async fn module_tool_call_reports_unknown_tool_as_error() {
.expect("disconnect fixture");
}
-#[tokio::test]
-#[ignore = "requires a TinyMCP library: node scripts/modules/build.mjs tinymcp"]
-async fn disabling_server_drops_its_live_module_connection() {
- let (_tmp, config) = fresh_workspace_config();
- let server_id = install_server(&config, "@openhuman-test/echo", stdio_server()).await;
- openhuman_core::mcp::registry::ops::mcp_clients_set_enabled(&config, server_id.clone(), true)
- .await
- .expect("enable server");
- openhuman_core::mcp::registry::ops::mcp_clients_connect(&config, server_id.clone())
- .await
- .expect("connect stdio fixture through TinyBus");
- assert!(
- openhuman_core::mcp::registry::connections::is_connected_for_config(&config, &server_id)
- .await
- );
-
- openhuman_core::mcp::registry::ops::mcp_clients_set_enabled(&config, server_id.clone(), false)
- .await
- .expect("disable server");
- assert!(
- !openhuman_core::mcp::registry::connections::is_connected_for_config(&config, &server_id)
- .await,
- "disabling an install must close the module-owned connection"
- );
-}
-
-#[tokio::test]
-#[ignore = "requires a TinyMCP library: node scripts/modules/build.mjs tinymcp"]
-async fn disabled_server_accepts_environment_update_without_reconnecting() {
- use std::collections::HashMap;
-
- let (_tmp, config) = fresh_workspace_config();
- let server_id = install_server(&config, "@openhuman-test/echo", stdio_server()).await;
- let mut env = HashMap::new();
- env.insert("API_KEY".to_owned(), "test-only-secret".to_owned());
-
- let result =
- openhuman_core::mcp::registry::ops::mcp_clients_update_env(&config, server_id.clone(), env)
- .await
- .expect("confidential disabled-server update succeeds");
- assert_eq!(result.value["status"], "disabled");
- assert_eq!(result.value["env_keys"], json!(["API_KEY"]));
- assert!(
- !openhuman_core::mcp::registry::connections::is_connected_for_config(&config, &server_id)
- .await
- );
-}
-
#[tokio::test]
#[ignore = "requires a TinyMCP library: node scripts/modules/build.mjs tinymcp"]
async fn per_config_lookups_are_isolated_by_workspace() {
@@ -177,33 +129,7 @@ async fn per_config_lookups_are_isolated_by_workspace() {
#[tokio::test]
#[ignore = "requires a TinyMCP library: node scripts/modules/build.mjs tinymcp"]
-async fn disabled_install_is_not_dialed_during_startup() {
- use openhuman_core::mcp::registry::{connections, ops};
-
- let (_tmp, config) = fresh_workspace_config();
- let server_id = install_server(
- &config,
- "@openhuman-test/disabled",
- json!({
- "command": "/nonexistent-disabled-mcp-server",
- "enabled": false
- }),
- )
- .await;
- openhuman_core::mcp::registry::boot::spawn_installed_servers(&config).await;
- let status = ops::mcp_clients_status(&config).await.expect("status");
- let entry = status.value["servers"]
- .as_array()
- .and_then(|servers| servers.iter().find(|entry| entry["server_id"] == server_id))
- .expect("disabled install remains visible");
- assert_eq!(entry["status"], "disabled");
- assert!(entry["last_error"].is_null());
- assert!(!connections::is_connected_for_config(&config, &server_id).await);
-}
-
-#[tokio::test]
-#[ignore = "requires a TinyMCP library: node scripts/modules/build.mjs tinymcp"]
-async fn per_config_auth_failure_surfaces_401_reason_without_cross_workspace_leak() {
+async fn per_config_auth_failure_does_not_leak_across_workspaces() {
use openhuman_core::mcp::registry::{connections, ops};
use wiremock::matchers::any;
use wiremock::{Mock, MockServer, ResponseTemplate};
@@ -233,15 +159,6 @@ async fn per_config_auth_failure_surfaces_401_reason_without_cross_workspace_lea
.is_err(),
"the module must report a 401 as a failed connection"
);
- assert_eq!(
- connections::auth_hint_for_config(&config_a, &server_id).await,
- Some("credential_required")
- );
- assert_eq!(
- connections::last_error_for_config(&config_a, &server_id).await,
- None,
- "401 response text stays hidden; the typed auth hint carries the user-facing reason"
- );
assert!(connections::auth_hint_for_config(&config_b, &server_id)
.await
.is_none());
diff --git a/tests/mcp_registry_multi_server.rs b/tests/mcp_registry_multi_server.rs
index 33089f99c9..8d9934f191 100644
--- a/tests/mcp_registry_multi_server.rs
+++ b/tests/mcp_registry_multi_server.rs
@@ -257,47 +257,3 @@ async fn failed_connect_does_not_block_healthy_peer() {
disconnect(&config, good).await;
}
-#[tokio::test]
-async fn disabled_server_contributes_no_tools_to_agent_surface() {
- let (_workspace, config) = fresh_workspace_config();
- let servers = Map::from_iter([
- ("@disabled-test/live".to_owned(), stub_server(false)),
- ("@disabled-test/quiet".to_owned(), stub_server(false)),
- ]);
- let installed = install_servers(&config, servers).await;
- let live = &installed["@disabled-test/live"];
- let quiet = &installed["@disabled-test/quiet"];
- connect(&config, live).await.expect("live server connects");
-
- assert!(
- openhuman_core::mcp::registry::ops::mcp_clients_connect(&config, quiet.to_owned())
- .await
- .is_err(),
- "an explicitly disabled server must refuse connection"
- );
- let statuses = openhuman_core::mcp::registry::ops::mcp_clients_status(&config)
- .await
- .expect("read server status");
- let status_for = |id: &str| {
- statuses.value["servers"]
- .as_array()
- .unwrap()
- .iter()
- .find(|status| status["server_id"] == id)
- .expect("server remains visible in status")
- };
- assert_eq!(status_for(live)["status"], "connected");
- assert_eq!(status_for(quiet)["status"], "disabled");
-
- let all_tools =
- openhuman_core::mcp::registry::connections::all_connected_tools_for_config(&config).await;
- assert!(all_tools
- .iter()
- .any(|(id, _, tool)| id == live && tool.name == "echo"));
- assert!(all_tools.iter().all(|(id, _, _)| id != quiet));
- assert_eq!(
- call_echo(&config, live, "live-while-quiet").await,
- "live-while-quiet"
- );
- disconnect(&config, live).await;
-}