tenant deletion/reset

This commit is contained in:
2025-11-11 12:17:24 +01:00
parent 4f29ff73c6
commit 8751637b92
15 changed files with 1015 additions and 27 deletions
+19
View File
@@ -129,6 +129,25 @@ impl FakeStorage {
let guard = self.objects.lock().await;
guard.len()
}
pub async fn object_count_with_prefix(&self, prefix: &str) -> usize {
let guard = self.objects.lock().await;
guard.keys().filter(|key| key.starts_with(prefix)).count()
}
pub async fn contains_key(&self, key: &str) -> bool {
let guard = self.objects.lock().await;
guard.contains_key(key)
}
pub async fn keys_with_prefix(&self, prefix: &str) -> Vec<String> {
let guard = self.objects.lock().await;
guard
.keys()
.filter(|key| key.starts_with(prefix))
.cloned()
.collect()
}
}
pub struct TestApp {