Registry testing - part 13

This commit is contained in:
Maurus Decimus
2026-03-23 18:52:36 +01:00
parent 944505a925
commit 3a7dd3ca5d
42 changed files with 1524 additions and 1233 deletions

View File

@@ -218,6 +218,11 @@ impl Account {
self.registry_create_object(Action::ReloadSettings).await;
}
pub async fn reload_lookup_stores(&self) {
self.registry_create_object(Action::ReloadLookupStores)
.await;
}
pub async fn registry_update_object_expect_err(
&self,
object: ObjectType,

View File

@@ -419,6 +419,10 @@ impl TestServer {
self.reset
}
pub fn tmp_dir(&self) -> &str {
self.temp_dir.path.as_os_str().to_str().unwrap()
}
pub fn shutdown(&self) {
let _ = self.shutdown_tx.send(true);
}
@@ -427,6 +431,11 @@ impl TestServer {
Session::test(self.server.clone())
}
pub fn new_mta_session_with_shutdown(&self) -> (Session<DummyIo>, watch::Sender<bool>) {
let (tx, rx) = watch::channel(true);
(Session::test_with_shutdown(self.server.clone(), rx), tx)
}
pub async fn resources(&self, name: &'static str, collection: Collection) -> Arc<DavResources> {
let account_id = self.account(name).id().document_id();
self.server