Skip to content

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

test(storage): point test configs at persistent local storage

Steven Enamakel7e95e3a7e63f
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 8b103ac8e4..8767215939 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
@@ -10,6 +10,7 @@ async fn debug_dump_composes_each_flow_prompt_from_the_copilot_bus() {
config_path: temp.path().join("config.toml"),
..Config::default()
};
+ 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 178fe2e6dc..502851bb8b 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
@@ -87,6 +87,7 @@ fn session_report_measures_the_visible_belt_not_the_registry() {
..crate::config::Config::default()
};
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 18bca19c68..be96f07b54 100644
--- a/crates/openhuman-core/src/flows/builder_tools_tests.rs
+++ b/crates/openhuman-core/src/flows/builder_tools_tests.rs
@@ -16,6 +16,7 @@ fn test_config(tmp: &TempDir) -> Arc<Config> {
..Config::default()
};
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 1bf7f6f0df..0f58896bef 100644
--- a/crates/openhuman-core/src/flows/caps_host/ops_tests.rs
+++ b/crates/openhuman-core/src/flows/caps_host/ops_tests.rs
@@ -39,6 +39,7 @@ fn agent_test_config(tmp: &tempfile::TempDir) -> Config {
..Config::default()
};
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 a5e2d7fb05..6a07d16e76 100644
--- a/crates/openhuman-core/src/flows/ops_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_tests.rs
@@ -16,6 +16,7 @@ fn test_config(tmp: &TempDir) -> Config {
// every class, so nothing is ever `blocked`.
config.autonomy.enabled = true;
std::fs::create_dir_all(&config.workspace_dir).unwrap();
+ crate::storage::local::use_persistent_default_for_test(&config.workspace_dir);
config
}