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: use shared memory backend helper in store document tests
Steven Enamakelaafd72199600
diff --git a/crates/openhuman-core/src/integrations/task_sources/store_documents_tests.rs b/crates/openhuman-core/src/integrations/task_sources/store_documents_tests.rsindex 0f334fd431..ed2b9f91f2 100644--- a/crates/openhuman-core/src/integrations/task_sources/store_documents_tests.rs+++ b/crates/openhuman-core/src/integrations/task_sources/store_documents_tests.rs@@ -1,12 +1,13 @@use super::*;-use crate::storage::{MemoryStorage, Scope, StorageBackend};+use crate::storage::{test_support::memory_backend, Scope, StorageBackend};-fn docs_in(storage: &MemoryStorage, scope: &str) -> Docs {+fn docs_in(storage: &dyn StorageBackend, scope: &str) -> Docs {Docs::over(&storage.for_scope(&Scope::new(scope).unwrap()).unwrap())}fn docs() -> Docs {- docs_in(&MemoryStorage::new(), "local")+ let storage = memory_backend();+ docs_in(storage.as_ref(), "local")}fn github_filter() -> FilterSpec {diff --git a/crates/openhuman-core/src/security/devices/store_documents_tests.rs b/crates/openhuman-core/src/security/devices/store_documents_tests.rsindex db486efcb8..4fdcd4d2e8 100644--- a/crates/openhuman-core/src/security/devices/store_documents_tests.rs+++ b/crates/openhuman-core/src/security/devices/store_documents_tests.rs@@ -1,12 +1,13 @@use super::*;-use crate::storage::{MemoryStorage, Scope, StorageBackend};+use crate::storage::{test_support::memory_backend, Scope, StorageBackend};-fn docs_in(storage: &MemoryStorage, scope: &str) -> Docs {+fn docs_in(storage: &dyn StorageBackend, scope: &str) -> Docs {Docs::over(&storage.for_scope(&Scope::new(scope).unwrap()).unwrap())}fn docs() -> Docs {- docs_in(&MemoryStorage::new(), "local")+ let storage = memory_backend();+ docs_in(storage.as_ref(), "local")}#[test]