Skip to content

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

test(json_rpc_e2e): bind e2e config to explicit storage url

Steven Enamakel6435b242a35b
diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rs
index e3c998483b..f46330ff7d 100644
--- a/tests/json_rpc_e2e.rs
+++ b/tests/json_rpc_e2e.rs
@@ -2772,17 +2772,25 @@ async fn json_rpc_cron_manual_worker_survives_caller_cancel_on_published_tinyflo
write_min_config(&openhuman_home, &mock_origin);
write_min_config(&openhuman_home.join("users").join("e2e-user"), &mock_origin);
- let config = Config {
+ let storage_url = openhuman_core::storage::config::default_url(&workspace);
+ let config_path = openhuman_home.join("config.toml");
+ let config_text = std::fs::read_to_string(&config_path).expect("read E2E config");
+ std::fs::write(
+ &config_path,
+ format!("{config_text}\n[storage]\nurl = {storage_url:?}\n"),
+ )
+ .expect("bind E2E config to its explicit storage URL");
+ let mut config = Config {
workspace_dir: workspace.clone(),
action_dir: workspace.clone(),
- config_path: openhuman_home.join("config.toml"),
+ config_path,
..Config::default()
};
+ config.storage.url = Some(storage_url.clone());
// Install the exact backend CoreContext will use before seeding. Opening
// the local fallback alone is insufficient: core boot may subsequently
// install/rebind the configured backend, leaving a fixture in the wrong DB.
- let storage_url = openhuman_core::storage::config::default_url(&workspace);
let backend = openhuman_core::storage::open(&storage_url)
.await
.expect("open the host's workspace storage backend");