The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(tests): extract shared docs MCP server config into a helper
Steven Enamakeldcb342d7bfe6
diff --git a/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs b/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rsindex b434f16f46..a9146e799b 100644--- a/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs+++ b/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs@@ -470,6 +470,16 @@ fn all_tools_registers_gitbooks_when_enabled() {);}+/// The `docs` MCP server the registry-gate tests declare in config.+fn docs_server() -> crate::config::McpServerConfig {+ crate::config::McpServerConfig::from(tinymcp_bus::McpServerConfig {+ name: "docs".into(),+ endpoint: "https://example.com/mcp".into(),+ description: Some("Example docs MCP".into()),+ ..Default::default()+ })+}+#[test]// Wholly about the static MCP bridge surface, which the `mcp` feature compiles// out — no meaningful residue to assert in the disabled build (the@@ -480,20 +490,7 @@ fn all_tools_registers_generic_mcp_bridge_tools_when_servers_exist() {let tmp = TempDir::new().unwrap();let mut cfg = test_config(&tmp);cfg.gitbooks.enabled = false;- cfg.mcp_client.servers.push(crate::config::McpServerConfig {- server: tinymcp_bus::McpServerConfig {- name: "docs".into(),- endpoint: "https://example.com/mcp".into(),- description: Some("Example docs MCP".into()),- enabled: true,- allowed_tools: Vec::new(),- disallowed_tools: Vec::new(),- timeout_secs: 30,- auth: crate::config::McpAuthConfig::None,- ..Default::default()- },- ..Default::default()- });+ cfg.mcp_client.servers.push(docs_server());let tools = integration_tools_for_config(&tmp, &cfg);let names = tool_names(&tools);@@ -517,20 +514,7 @@ fn all_tools_omits_mcp_tools_when_gate_off() {let tmp = TempDir::new().unwrap();let mut cfg = test_config(&tmp);cfg.gitbooks.enabled = false;- cfg.mcp_client.servers.push(crate::config::McpServerConfig {- server: tinymcp_bus::McpServerConfig {- name: "docs".into(),- endpoint: "https://example.com/mcp".into(),- description: Some("Example docs MCP".into()),- enabled: true,- allowed_tools: Vec::new(),- disallowed_tools: Vec::new(),- timeout_secs: 30,- auth: crate::config::McpAuthConfig::None,- ..Default::default()- },- ..Default::default()- });+ cfg.mcp_client.servers.push(docs_server());let names = tool_names(&integration_tools_for_config(&tmp, &cfg));let leaked: Vec<&String> = names