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
chore: files changed tests/cli_storage_url_e2e.rs,tests/storage_agent_scopes_e2e.rs,tests/storage_ap
Steven Enamakel4cfb5b15c8f9
diff --git a/tests/cli_storage_url_e2e.rs b/tests/cli_storage_url_e2e.rsindex b3a8b3dafb..592032ecdc 100644--- a/tests/cli_storage_url_e2e.rs+++ b/tests/cli_storage_url_e2e.rs@@ -5,11 +5,10 @@use std::process::Command;-#[macro_use]-#[path = "support/storage_drivers.rs"]-mod storage_drivers;+#[path = "support/storage_case.rs"]+mod storage_case;-use storage_drivers::UrlCase;+use storage_case::UrlCase;fn core(workspace: &std::path::Path, url: Option<&str>, args: &[&str]) -> std::process::Output {let mut cmd = Command::new(env!("CARGO_BIN_EXE_openhuman-core"));@@ -71,7 +70,9 @@ fn one_shot(url: &str, args: &[&str]) -> (std::process::Output, tempfile::TempDi/// Every driver is asked the same thing: write a job in one process, list in/// another. A durable driver shows it to the second process; `memory` keeps/// nothing between processes, so it must not.-fn a_second_process_reads_what_a_one_shot_wrote_to_the_backend(case: UrlCase) {+#[test]+fn a_second_process_reads_what_a_one_shot_wrote_to_the_backend() {+ let case = UrlCase::open();let args = ["cron","add",@@ -124,4 +125,3 @@ fn a_second_process_reads_what_a_one_shot_wrote_to_the_backend(case: UrlCase) {);}-driver_cases!(url a_second_process_reads_what_a_one_shot_wrote_to_the_backend);diff --git a/tests/storage_agent_scopes_e2e.rs b/tests/storage_agent_scopes_e2e.rsindex 2ed9a9463b..19fc06f2ca 100644--- a/tests/storage_agent_scopes_e2e.rs+++ b/tests/storage_agent_scopes_e2e.rs@@ -23,11 +23,10 @@ use serde_json::json;#[path = "support/tinyhumans_boot.rs"]mod tinyhumans_boot;-#[macro_use]-#[path = "support/storage_drivers.rs"]-mod storage_drivers;+#[path = "support/storage_case.rs"]+mod storage_case;-use storage_drivers::Case;+use storage_case::Case;#[path = "support/cron_policy_failure.rs"]mod cron_policy_failure;@@ -101,7 +100,9 @@ async fn wait_until_due(ctx: &Arc<CoreContext>, config: &Config, id: &str) {panic!("job {id} never became due");}-async fn two_agents_keep_cron_and_flows_apart(case: Case) {+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]+async fn two_agents_keep_cron_and_flows_apart() {+ let case = Case::open();let workspace = tempfile::tempdir().unwrap();let config = Config {workspace_dir: workspace.path().join("workspace"),@@ -219,7 +220,9 @@ async fn two_agents_keep_cron_and_flows_apart(case: Case) {assert!(AgentContextRegistry::deregister("agent-beta", &beta));}-async fn no_acting_agent_falls_back_to_the_local_scope(case: Case) {+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]+async fn no_acting_agent_falls_back_to_the_local_scope() {+ let case = Case::open();let workspace = tempfile::tempdir().unwrap();let config = Config {workspace_dir: workspace.path().join("workspace"),@@ -286,9 +289,3 @@ async fn no_acting_agent_falls_back_to_the_local_scope(case: Case) {assert!(AgentContextRegistry::deregister("agent-gamma", &agent));}-driver_cases!(- async two_agents_keep_cron_and_flows_apart,- no_acting_agent_falls_back_to_the_local_scope,- policy_reads_refuse_execution_without_consuming_a_slot,- malformed_policy_rows_refuse_execution-);diff --git a/tests/storage_approvals_e2e.rs b/tests/storage_approvals_e2e.rsindex be872172dc..63d597e0aa 100644--- a/tests/storage_approvals_e2e.rs+++ b/tests/storage_approvals_e2e.rs@@ -9,11 +9,10 @@ use openhuman_core::config::Config;use openhuman_core::security::approval::store;use openhuman_core::security::approval::types::{ApprovalDecision, PendingApproval};-#[macro_use]-#[path = "support/storage_drivers.rs"]-mod storage_drivers;+#[path = "support/storage_case.rs"]+mod storage_case;-use storage_drivers::Case;+use storage_case::Case;fn pending(id: &str) -> PendingApproval {PendingApproval::new(@@ -25,7 +24,9 @@ fn pending(id: &str) -> PendingApproval {)}-fn a_configured_backend_holds_the_approvals_instead_of_approval_db(case: Case) {+#[test]+fn a_configured_backend_holds_the_approvals_instead_of_approval_db() {+ let case = Case::open();let workspace = tempfile::tempdir().unwrap();let config = Config {workspace_dir: workspace.path().to_path_buf(),@@ -63,4 +64,3 @@ fn a_configured_backend_holds_the_approvals_instead_of_approval_db(case: Case) {assert!(workspace.path().join("storage").join("storage.db").exists());}-driver_cases!(sync a_configured_backend_holds_the_approvals_instead_of_approval_db);diff --git a/tests/storage_delegation_e2e.rs b/tests/storage_delegation_e2e.rsindex 657800d8ad..c2ee2a5344 100644--- a/tests/storage_delegation_e2e.rs+++ b/tests/storage_delegation_e2e.rs@@ -21,11 +21,10 @@ use tinyagents_graph::delegation::DelegationState;#[path = "support/tinyhumans_boot.rs"]mod tinyhumans_boot;-#[macro_use]-#[path = "support/storage_drivers.rs"]-mod storage_drivers;+#[path = "support/storage_case.rs"]+mod storage_case;-use storage_drivers::Case;+use storage_case::Case;fn state(plan: &str) -> DelegationState {DelegationState {@@ -51,7 +50,9 @@ async fn plan_of(.and_then(|checkpoint| checkpoint.state.plan)}-async fn the_delegation_checkpointer_resumes_and_keeps_scopes_apart(case: Case) {+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]+async fn the_delegation_checkpointer_resumes_and_keeps_scopes_apart() {+ let case = Case::open();let workspace = tempfile::tempdir().unwrap();let config = Config {workspace_dir: workspace.path().join("workspace"),@@ -164,4 +165,3 @@ async fn the_delegation_checkpointer_resumes_and_keeps_scopes_apart(case: Case)assert!(AgentContextRegistry::deregister("agent-beta", &beta));}-driver_cases!(async the_delegation_checkpointer_resumes_and_keeps_scopes_apart);diff --git a/tests/storage_desktop_upgrade_e2e.rs b/tests/storage_desktop_upgrade_e2e.rsindex e142383cd5..1e05d9b2d1 100644--- a/tests/storage_desktop_upgrade_e2e.rs+++ b/tests/storage_desktop_upgrade_e2e.rs@@ -35,11 +35,10 @@ use tinystoragedrivers_core::{Capability, Query};#[path = "../crates/openhuman-core/src/util/classic_transcript_fixture.rs"]mod classic_transcript_fixture;-#[macro_use]-#[path = "support/storage_drivers.rs"]-mod storage_drivers;+#[path = "support/storage_case.rs"]+mod storage_case;-use storage_drivers::Case;+use storage_case::Case;/// The committed tinyflows workspace (written by the retired tinyflows-sqlite/// writers): flows, revisions, runs, drafts, checkpoints and cron jobs.@@ -436,7 +435,9 @@ async fn import_modules(workspace: &Path) {.await;}-async fn a_desktop_upgrade_is_lossless_and_leaves_the_legacy_files_untouched(case: Case) {+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]+async fn a_desktop_upgrade_is_lossless_and_leaves_the_legacy_files_untouched() {+ let case = Case::open();// TinyAgents' run ledger imports `sessions.db` (and appends to it) with// checked batches, which a driver without `ValidatedBatch` refuses.let local = case.backend().for_scope(&Scope::local()).unwrap();@@ -605,4 +606,3 @@ async fn a_desktop_upgrade_is_lossless_and_leaves_the_legacy_files_untouched(casassert_eq!(tree(workspace), before, "the legacy files changed");}-driver_cases!(async a_desktop_upgrade_is_lossless_and_leaves_the_legacy_files_untouched);diff --git a/tests/storage_domains_e2e.rs b/tests/storage_domains_e2e.rsindex 6e4e982bb8..fd4f4e6ed4 100644--- a/tests/storage_domains_e2e.rs+++ b/tests/storage_domains_e2e.rs@@ -14,11 +14,10 @@ use openhuman_core::integrations::task_sources::store as task_sources;use openhuman_core::integrations::task_sources::types::{FilterSpec, ProviderSlug, SourceTarget};use openhuman_core::security::devices::store as devices;-#[macro_use]-#[path = "support/storage_drivers.rs"]-mod storage_drivers;+#[path = "support/storage_case.rs"]+mod storage_case;-use storage_drivers::Case;+use storage_case::Case;fn notification(id: &str) -> IntegrationNotification {IntegrationNotification {@@ -37,7 +36,9 @@ fn notification(id: &str) -> IntegrationNotification {}}-fn a_configured_backend_holds_devices_notifications_and_task_sources(case: Case) {+#[test]+fn a_configured_backend_holds_devices_notifications_and_task_sources() {+ let case = Case::open();let workspace = tempfile::tempdir().unwrap();let config = Config {workspace_dir: workspace.path().to_path_buf(),@@ -99,4 +100,3 @@ fn a_configured_backend_holds_devices_notifications_and_task_sources(case: Case)assert!(workspace.path().join("storage/storage.db").exists());}-driver_cases!(sync a_configured_backend_holds_devices_notifications_and_task_sources);diff --git a/tests/storage_flows_e2e.rs b/tests/storage_flows_e2e.rsindex 593ea425ed..c1f0400013 100644--- a/tests/storage_flows_e2e.rs+++ b/tests/storage_flows_e2e.rs@@ -11,13 +11,14 @@ use openhuman_core::flows;use openhuman_core::flows::tinyflows::state::FlowState;use serde_json::json;-#[macro_use]-#[path = "support/storage_drivers.rs"]-mod storage_drivers;+#[path = "support/storage_case.rs"]+mod storage_case;-use storage_drivers::Case;+use storage_case::Case;-async fn a_configured_backend_holds_cron_flows_and_flow_state(case: Case) {+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]+async fn a_configured_backend_holds_cron_flows_and_flow_state() {+ let case = Case::open();let workspace = tempfile::tempdir().unwrap();let config = Config {workspace_dir: workspace.path().to_path_buf(),@@ -159,7 +160,9 @@ async fn a_configured_backend_holds_cron_flows_and_flow_state(case: Case) {/// The stores tinyflows used to write (`jobs.db`, `flows.db`, `checkpoints.db`,/// `drafts/`) are copied into a configured backend by the boot-time import,/// read-only: the legacy files are byte-identical afterwards.-async fn legacy_tinyflows_files_are_imported_into_a_configured_backend(case: Case) {+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]+async fn legacy_tinyflows_files_are_imported_into_a_configured_backend() {+ let case = Case::open();let workspace = tempfile::tempdir().unwrap();let fixtures = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../openhuman-core/src/storage/import/fixtures/tinyflows/workspace");@@ -224,7 +227,3 @@ fn copy_tree(from: &std::path::Path, to: &std::path::Path) {}}-driver_cases!(- async a_configured_backend_holds_cron_flows_and_flow_state,- legacy_tinyflows_files_are_imported_into_a_configured_backend-);diff --git a/tests/storage_scope_e2e.rs b/tests/storage_scope_e2e.rsindex 65e8f7d979..ac6c6643c4 100644--- a/tests/storage_scope_e2e.rs+++ b/tests/storage_scope_e2e.rs@@ -24,11 +24,10 @@ use openhuman_core::HostKind;#[path = "support/tinyhumans_boot.rs"]mod tinyhumans_boot;-#[macro_use]-#[path = "support/storage_drivers.rs"]-mod storage_drivers;+#[path = "support/storage_case.rs"]+mod storage_case;-use storage_drivers::Case;+use storage_case::Case;fn job_names(config: &Config) -> Vec<String> {cron::list_jobs(config)@@ -38,7 +37,9 @@ fn job_names(config: &Config) -> Vec<String> {.collect()}-async fn background_work_visits_every_agent_scope(case: Case) {+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]+async fn background_work_visits_every_agent_scope() {+ let case = Case::open();let workspace = tempfile::tempdir().unwrap();let config = Config {workspace_dir: workspace.path().join("workspace"),@@ -130,4 +131,3 @@ async fn background_work_visits_every_agent_scope(case: Case) {assert!(recorded.contains(&(None, Vec::new())), "{recorded:?}");}-driver_cases!(async background_work_visits_every_agent_scope);diff --git a/tests/storage_secrets_e2e.rs b/tests/storage_secrets_e2e.rsindex 9b32f04e62..4c7fbd1c86 100644--- a/tests/storage_secrets_e2e.rs+++ b/tests/storage_secrets_e2e.rs@@ -10,11 +10,10 @@ use openhuman_core::security::credentials::http_creds::{HttpCredential, HttpCreduse openhuman_core::security::credentials::profiles::{AuthProfile, AuthProfilesStore};use openhuman_core::security::secret_storage;-#[macro_use]-#[path = "support/storage_drivers.rs"]-mod storage_drivers;+#[path = "support/storage_case.rs"]+mod storage_case;-use storage_drivers::Case;+use storage_case::Case;/// The workspace every case shares. The process keyring caches the backend it/// first resolves (a `dev-keychain.json` under the workspace in effect then),@@ -27,7 +26,9 @@ fn keyring_workspace() -> &'static std::path::Path {.path()}-fn a_configured_backend_holds_keyring_and_credential_secrets(case: Case) {+#[test]+fn a_configured_backend_holds_keyring_and_credential_secrets() {+ let case = Case::open();let workspace = keyring_workspace();// Keep any process-backend fallback inside the temp workspace, and give// the storage secrets a master key without touching an OS keychain.@@ -127,4 +128,3 @@ fn a_configured_backend_holds_keyring_and_credential_secrets(case: Case) {assert_eq!(profiles.load().unwrap().profiles.len(), 1);}-driver_cases!(sync a_configured_backend_holds_keyring_and_credential_secrets);