The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(saas_mode): give every node a storage backend
Steven Enamakel1f00abdd544a
diff --git a/tests/saas_mode/cluster.rs b/tests/saas_mode/cluster.rsindex 68edbf392d..6273b0c876 100644--- a/tests/saas_mode/cluster.rs+++ b/tests/saas_mode/cluster.rs@@ -42,7 +42,9 @@ fn hanging_backend() -> u16 {}/// The lease scenario on one storage configuration: `storage_url` shared by-/// both cores (cluster leases), or `None` (file locks on the shared root).+/// both cores (cluster leases), or a deployment-local SQLite backend when+/// omitted. File-lease behavior is covered directly by the profile/storage+/// unit tests; SaaS turn tests need a session backend either way.fn one_core_at_a_time(storage_url: Option<&str>) {let d = deployment(true);let storage_url =diff --git a/tests/saas_mode/hashed_ids.rs b/tests/saas_mode/hashed_ids.rsindex 0c535f7688..223ea88de6 100644--- a/tests/saas_mode/hashed_ids.rs+++ b/tests/saas_mode/hashed_ids.rs@@ -23,7 +23,7 @@ fn start_hashed(d: &Deployment, name: &str) -> (Server, String, PathBuf) {std::fs::write(&d.config,format!(- "root = {:?}\nprofile_ids = \"hashed\"\n",+ "root = {:?}\nprofile_ids = \"hashed\"\nnode_id = \"hashed-profile-test\"\n",d.root.display().to_string()),)diff --git a/tests/saas_mode/node.rs b/tests/saas_mode/node.rsindex 0edf83be6e..07856d9605 100644--- a/tests/saas_mode/node.rs+++ b/tests/saas_mode/node.rs@@ -108,10 +108,11 @@ pub fn start_node_logging(.display().to_string(),);- if let Some(url) = storage_url {- config.push_str(&format!(- "storage_url = {url:?}\nadvertise_url = {base:?}\n"- ));+ let url = storage_url.unwrap_or("sqlite:{tmp}/saas-storage.db");+ let url = url.replace("{tmp}", &d.tmp.path().display().to_string());+ config.push_str(&format!("storage_url = {url:?}\n"));+ if storage_url.is_some() {+ config.push_str(&format!("advertise_url = {base:?}\n"));}config.push_str(extra);std::fs::write(&config_path, config).unwrap();diff --git a/tests/saas_mode_e2e.rs b/tests/saas_mode_e2e.rsindex 614b3663e9..32f791bef2 100644--- a/tests/saas_mode_e2e.rs+++ b/tests/saas_mode_e2e.rs@@ -298,7 +298,8 @@ fn gateway_requests_run_under_the_named_users_profile() {assert_eq!(status, 404, "{path}");}- // The credential lives in alice's own directory.+ // The configured storage backend owns credentials, so they are not+ // written beside the profile's workspace and sandbox.let profile_dir = d.root.join("users").join(alice.as_str());let stored: Vec<_> = std::fs::read_dir(&profile_dir).unwrap()@@ -306,8 +307,8 @@ fn gateway_requests_run_under_the_named_users_profile() {.map(|e| e.file_name().to_string_lossy().into_owned()).collect();assert!(- stored.iter().any(|name| name.contains("auth")),- "credential store beside alice's config: {stored:?}"+ !stored.iter().any(|name| name.contains("auth")),+ "backend credentials must not create an on-disk sidecar: {stored:?}");drop(server);}