Skip to content

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

chore: files changed crates/openhuman-core/src/doctor/checks/storage_tests.rs,crates/openhuman-core/

Steven Enamakel38bf9f6af06c
diff --git a/crates/openhuman-core/src/doctor/checks/storage_tests.rs b/crates/openhuman-core/src/doctor/checks/storage_tests.rs
index e35965537a..232c487883 100644
--- a/crates/openhuman-core/src/doctor/checks/storage_tests.rs
+++ b/crates/openhuman-core/src/doctor/checks/storage_tests.rs
@@ -63,19 +63,8 @@ async fn file_storage_probe_reads_existing_directory_and_never_creates_it() {
}
#[tokio::test]
-async fn composite_storage_checks_supported_children_and_skips_unprobeable_s3() {
- let findings = inspect_storage_config(
- "storage/connect",
- StorageConfig::Composite {
- records: Box::new(StorageConfig::Memory),
- blobs: Box::new(tinystoragedrivers::BlobConfig::S3 {
- url: "s3://fixture-bucket".to_owned(),
- }),
- },
- 0,
- )
- .await;
- assert_eq!(findings.len(), 2);
+async fn memory_storage_probe_reports_the_backend_as_available() {
+ let findings = inspect_storage_config("storage/connect", StorageConfig::Memory).await;
+ assert_eq!(findings.len(), 1);
assert_eq!(findings[0].severity, FindingSeverity::Pass);
- assert_eq!(findings[1].severity, FindingSeverity::Skipped);
}
diff --git a/crates/openhuman-core/src/storage/fenced_backend_upstream_tests.rs b/crates/openhuman-core/src/storage/fenced_backend_upstream_tests.rs
index 84e74d6998..0596244a75 100644
--- a/crates/openhuman-core/src/storage/fenced_backend_upstream_tests.rs
+++ b/crates/openhuman-core/src/storage/fenced_backend_upstream_tests.rs
@@ -10,7 +10,7 @@ use crate::storage::{Storage, StorageBackend};
use serde_json::json;
use std::sync::atomic::{AtomicU64, Ordering};
use std::time::Duration;
-use tinystoragedrivers_types::{Capabilities, Capability, CollectionSpec, ErrorKind, Precondition, Scope, Version};
+use tinystoragedrivers_types::{Capability, CollectionSpec, ErrorKind, Precondition, Scope, Version};
const TTL: Duration = Duration::from_secs(30);
const MARGIN_MS: u64 = 5_000;
@@ -68,7 +68,11 @@ impl Node {
self.storage.for_scope(&Scope::new(scope).unwrap()).unwrap()
}
- async fn put(&self, scope: &str, id: &str) -> Result<Version> {
+ async fn put(
+ &self,
+ scope: &str,
+ id: &str,
+ ) -> std::result::Result<Version, tinystoragedrivers_types::StorageError> {
self.scoped(scope)
.documents()
.put("notes", id, json!({"by": self.name}), Precondition::None)
@@ -291,8 +295,10 @@ async fn paused_holder(
/// B takes over, A's write lands. The driver re-reads the lease record in
/// the write's own atomic step and refuses it.
async fn driver_refuses_the_write_the_host_check_admitted(shared: Arc<dyn StorageBackend>) {
- assert!(shared.capabilities().contains(Capability::Fencing));
- let (a, fence, leases) = paused_holder(shared).await;
+ assert!(shared
+ .capabilities()
+ .contains(Capability::ConditionalWrites));
+ let (a, fence, leases) = paused_holder(&shared).await;
let scoped = a.for_scope(&Scope::new("profile:alice").unwrap()).unwrap();
scoped
.documents()
@@ -507,7 +513,7 @@ async fn expiring_blob_writes_are_fenced() {
/// refused every conversation append on the default (SQLite) backend.
async fn conditional_append_passes_through(inner: Arc<dyn StorageBackend>) {
let wrapped = wrap(inner);
- let scoped = wrapped.for_scope(&Scope::local()).unwrap();
+ let scoped = wrapped.for_scope(&Scope::new("local").unwrap()).unwrap();
let streams = scoped.streams();
assert_eq!(
streams