From d9b36a3806eba19eb645145a4e455c34102028f0 Mon Sep 17 00:00:00 2001 From: John Coffey Date: Sat, 19 Sep 2026 08:54:21 -0700 Subject: [PATCH] Undelete tests: restore the default upload settings on entry (UD-1) Inside system_tests the quota suite leaves uploads with a 1-second lifetime, so test 6's Sieve script upload could expire before its set (BlobNotFound), intermittently. The suite now resets upload quota, count and lifetime to their defaults first. --- tests/src/system/undelete.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/src/system/undelete.rs b/tests/src/system/undelete.rs index 8a25dd9..0c075e1 100644 --- a/tests/src/system/undelete.rs +++ b/tests/src/system/undelete.rs @@ -25,7 +25,7 @@ use jmap_client::client::{Client, Credentials}; use registry::{ schema::{ prelude::{ObjectType, Property}, - structs::{DataRetention, Expression, Imap, MtaStageAuth, MtaStageRcpt, Task}, + structs::{DataRetention, Expression, Imap, Jmap, MtaStageAuth, MtaStageRcpt, Task}, }, types::duration::Duration, }; @@ -46,6 +46,19 @@ const DAY: u64 = 86_400; pub async fn test(test: &mut TestServer) { println!("Running undelete tests..."); let admin = test.account("admin@example.org"); + // Inside system_tests the quota suite leaves a 1-second upload lifetime, + // which a script upload can outlive before its set + admin + .registry_update_setting( + Jmap::default(), + &[ + Property::UploadQuota, + Property::MaxUploadCount, + Property::UploadTtl, + ], + ) + .await; + admin.reload_settings().await; let user = admin .create_user_account("undelete@example.org", SECRET, "Undelete", &[], vec![]) .await;