Skip to content

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

test: disable mcp component in test configs

Steven Enamakelde3666da47cc
diff --git a/crates/openhuman-core/src/core/agent_cli/debug/mod_tests.rs b/crates/openhuman-core/src/core/agent_cli/debug/mod_tests.rs
index ef8734bbd7..5477a77541 100644
--- a/crates/openhuman-core/src/core/agent_cli/debug/mod_tests.rs
+++ b/crates/openhuman-core/src/core/agent_cli/debug/mod_tests.rs
@@ -4,15 +4,14 @@ use super::*;
#[tokio::test]
async fn debug_dump_composes_each_flow_prompt_from_the_copilot_bus() {
let temp = tempfile::tempdir().expect("workspace");
- let config = Config {
+ let mut config = Config {
workspace_dir: temp.path().join("workspace"),
action_dir: temp.path().join("action"),
config_path: temp.path().join("config.toml"),
..Config::default()
};
+ config.components.mcp = false;
crate::storage::local::use_persistent_default_for_test(&config.workspace_dir);
- #[cfg(feature = "mcp")]
- crate::mcp::install_test_module_port(&config);
AgentDefinitionRegistry::init_global(&config.workspace_dir)
.expect("initialize builtin registry");
let ctx = crate::core::runtime::DispatchCtx::host_default();
diff --git a/crates/openhuman-core/src/core/agent_cli/debug/prompt_size_tests.rs b/crates/openhuman-core/src/core/agent_cli/debug/prompt_size_tests.rs
index f7e99b3a2e..f6c85abb7d 100644
--- a/crates/openhuman-core/src/core/agent_cli/debug/prompt_size_tests.rs
+++ b/crates/openhuman-core/src/core/agent_cli/debug/prompt_size_tests.rs
@@ -80,16 +80,15 @@ fn session_report_measures_the_visible_belt_not_the_registry() {
crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins()
.unwrap();
let tmp = tempfile::TempDir::new().unwrap();
- let config = crate::config::Config {
+ let mut config = crate::config::Config {
workspace_dir: tmp.path().join("workspace"),
action_dir: tmp.path().join("workspace"),
config_path: tmp.path().join("config.toml"),
..crate::config::Config::default()
};
+ config.components.mcp = false;
std::fs::create_dir_all(&config.workspace_dir).unwrap();
crate::storage::local::use_persistent_default_for_test(&config.workspace_dir);
- #[cfg(feature = "mcp")]
- crate::mcp::install_test_module_port(&config);
let agent = crate::agent::OpenHumanSessionHost::from_config_for_agent(
&crate::core::runtime::DispatchCtx::ambient(),
&config,
diff --git a/crates/openhuman-core/src/flows/builder_tools_tests.rs b/crates/openhuman-core/src/flows/builder_tools_tests.rs
index b9e2b1bc2c..346161132e 100644
--- a/crates/openhuman-core/src/flows/builder_tools_tests.rs
+++ b/crates/openhuman-core/src/flows/builder_tools_tests.rs
@@ -9,16 +9,15 @@ use tempfile::TempDir;
use tinytools::{PermissionLevel, Tool};
fn test_config(tmp: &TempDir) -> Arc<Config> {
- let config = Config {
+ let mut config = Config {
workspace_dir: tmp.path().join("workspace"),
action_dir: tmp.path().join("workspace"),
config_path: tmp.path().join("config.toml"),
..Config::default()
};
+ config.components.mcp = false;
std::fs::create_dir_all(&config.workspace_dir).unwrap();
crate::storage::local::use_persistent_default_for_test(&config.workspace_dir);
- #[cfg(feature = "mcp")]
- crate::mcp::install_test_module_port(&config);
Arc::new(config)
}
diff --git a/crates/openhuman-core/src/flows/caps_host/ops_tests.rs b/crates/openhuman-core/src/flows/caps_host/ops_tests.rs
index c715016ad4..856c88d096 100644
--- a/crates/openhuman-core/src/flows/caps_host/ops_tests.rs
+++ b/crates/openhuman-core/src/flows/caps_host/ops_tests.rs
@@ -32,16 +32,15 @@ fn workflow_origin(job_id: &str, require_approval: bool) -> AgentTurnOrigin {
}
fn agent_test_config(tmp: &tempfile::TempDir) -> Config {
- let config = Config {
+ let mut config = Config {
workspace_dir: tmp.path().join("workspace"),
action_dir: tmp.path().join("workspace"),
config_path: tmp.path().join("config.toml"),
..Config::default()
};
+ config.components.mcp = false;
std::fs::create_dir_all(&config.workspace_dir).unwrap();
crate::storage::local::use_persistent_default_for_test(&config.workspace_dir);
- #[cfg(feature = "mcp")]
- crate::mcp::install_test_module_port(&config);
config
}
diff --git a/crates/openhuman-core/src/flows/ops_tests.rs b/crates/openhuman-core/src/flows/ops_tests.rs
index 5926ebf25c..73fbf03120 100644
--- a/crates/openhuman-core/src/flows/ops_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_tests.rs
@@ -15,10 +15,9 @@ fn test_config(tmp: &TempDir) -> Config {
// manifest tests pass vacuously — a disabled policy answers `Allow` for
// every class, so nothing is ever `blocked`.
config.autonomy.enabled = true;
+ config.components.mcp = false;
std::fs::create_dir_all(&config.workspace_dir).unwrap();
crate::storage::local::use_persistent_default_for_test(&config.workspace_dir);
- #[cfg(feature = "mcp")]
- crate::mcp::install_test_module_port(&config);
config
}