Skip to content

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

test: drop redundant mcp and persistent storage setup from test configs

Steven Enamakelf99edcc89ac6
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 5477a77541..8b103ac8e4 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,14 +4,12 @@ use super::*;
#[tokio::test]
async fn debug_dump_composes_each_flow_prompt_from_the_copilot_bus() {
let temp = tempfile::tempdir().expect("workspace");
- let mut config = Config {
+ let 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);
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 f6c85abb7d..178fe2e6dc 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,15 +80,13 @@ 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 mut config = crate::config::Config {
+ let 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);
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 346161132e..18bca19c68 100644
--- a/crates/openhuman-core/src/flows/builder_tools_tests.rs
+++ b/crates/openhuman-core/src/flows/builder_tools_tests.rs
@@ -9,15 +9,13 @@ use tempfile::TempDir;
use tinytools::{PermissionLevel, Tool};
fn test_config(tmp: &TempDir) -> Arc<Config> {
- let mut config = Config {
+ let 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);
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 856c88d096..1bf7f6f0df 100644
--- a/crates/openhuman-core/src/flows/caps_host/ops_tests.rs
+++ b/crates/openhuman-core/src/flows/caps_host/ops_tests.rs
@@ -32,15 +32,13 @@ fn workflow_origin(job_id: &str, require_approval: bool) -> AgentTurnOrigin {
}
fn agent_test_config(tmp: &tempfile::TempDir) -> Config {
- let mut config = Config {
+ let 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);
config
}
diff --git a/crates/openhuman-core/src/flows/ops_tests.rs b/crates/openhuman-core/src/flows/ops_tests.rs
index 73fbf03120..a5e2d7fb05 100644
--- a/crates/openhuman-core/src/flows/ops_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_tests.rs
@@ -15,9 +15,7 @@ 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);
config
}