CalDAV Scheduling - part 6

This commit is contained in:
mdecimus
2025-06-21 19:53:23 +02:00
parent 068457ea87
commit 367ddeeae4
24 changed files with 869 additions and 73 deletions

View File

@@ -4,9 +4,11 @@
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
*/
use std::time::Duration;
use jmap_client::{
Error, Set,
client::Client,
client::{Client, Credentials},
core::{
query::Filter,
set::{SetError, SetErrorType, SetObject, SetRequest},
@@ -658,6 +660,19 @@ fn build_create_query(
}
}
pub async fn destroy_all_mailboxes_for_account(account_id: u32) {
let mut client = Client::new()
.credentials(Credentials::basic("admin", "secret"))
.follow_redirects(["127.0.0.1"])
.timeout(Duration::from_secs(3600))
.accept_invalid_certs(true)
.connect("https://127.0.0.1:8899")
.await
.unwrap();
client.set_default_account_id(Id::from(account_id));
destroy_all_mailboxes_no_wait(&client).await;
}
pub async fn destroy_all_mailboxes(test: &JMAPTest) {
wait_for_index(&test.server).await;
destroy_all_mailboxes_no_wait(&test.client).await;