Skip to content

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

test(flows): install test module port in test configs

Steven Enamakel7a5703beda90
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 8767215939..ef8734bbd7 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
@@ -11,6 +11,8 @@ async fn debug_dump_composes_each_flow_prompt_from_the_copilot_bus() {
..Config::default()
};
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 502851bb8b..f7e99b3a2e 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
@@ -88,6 +88,8 @@ fn session_report_measures_the_visible_belt_not_the_registry() {
};
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 be96f07b54..b9e2b1bc2c 100644
--- a/crates/openhuman-core/src/flows/builder_tools_tests.rs
+++ b/crates/openhuman-core/src/flows/builder_tools_tests.rs
@@ -17,6 +17,8 @@ fn test_config(tmp: &TempDir) -> Arc<Config> {
};
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 0f58896bef..c715016ad4 100644
--- a/crates/openhuman-core/src/flows/caps_host/ops_tests.rs
+++ b/crates/openhuman-core/src/flows/caps_host/ops_tests.rs
@@ -40,6 +40,8 @@ fn agent_test_config(tmp: &tempfile::TempDir) -> Config {
};
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 6a07d16e76..5926ebf25c 100644
--- a/crates/openhuman-core/src/flows/ops_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_tests.rs
@@ -17,6 +17,8 @@ fn test_config(tmp: &TempDir) -> Config {
config.autonomy.enabled = true;
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
}