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(storage): run lease model tests against sqlite backend
Steven Enamakel61d26f9c19ed
diff --git a/crates/openhuman-core/src/storage/lease_model_tests.rs b/crates/openhuman-core/src/storage/lease_model_tests.rsindex 6d9acf8123..a5542efaab 100644--- a/crates/openhuman-core/src/storage/lease_model_tests.rs+++ b/crates/openhuman-core/src/storage/lease_model_tests.rs@@ -14,7 +14,7 @@ use std::time::Duration;use proptest::prelude::*;-use crate::storage::MemoryStorage;+use crate::storage::test_support::SqliteBackend;const KEY: &str = "profile-1";const TTL_MS: u64 = 1_000;@@ -160,7 +160,7 @@ impl Model {}struct System {- storage: MemoryStorage,+ storage: SqliteBackend,leases: Vec<DocumentLeases>,grants: Vec<Option<LeaseGrant>>,}@@ -171,7 +171,7 @@ fn name(n: usize) -> String {impl System {fn new(nodes: usize) -> Self {- let storage = MemoryStorage::new();+ let storage = crate::storage::test_support::sqlite_backend().unwrap();let leases = (0..nodes).map(|n| Self::boot(&storage, n)).collect();Self {storage,@@ -180,8 +180,14 @@ impl System {}}- fn boot(storage: &MemoryStorage, n: usize) -> DocumentLeases {- DocumentLeases::cluster(storage, name(n), None, Duration::from_millis(TTL_MS)).unwrap()+ fn boot(storage: &SqliteBackend, n: usize) -> DocumentLeases {+ DocumentLeases::cluster(+ storage.backend.as_ref(),+ name(n),+ None,+ Duration::from_millis(TTL_MS),+ )+ .unwrap()}fn crash(&mut self, n: usize) {@@ -346,3 +352,5 @@ proptest! {runtime.block_on(run(nodes, steps))?;}}+#![cfg(feature = "storage-sqlite")]+