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.
This commit is contained in:
@@ -25,7 +25,7 @@ use jmap_client::client::{Client, Credentials};
|
|||||||
use registry::{
|
use registry::{
|
||||||
schema::{
|
schema::{
|
||||||
prelude::{ObjectType, Property},
|
prelude::{ObjectType, Property},
|
||||||
structs::{DataRetention, Expression, Imap, MtaStageAuth, MtaStageRcpt, Task},
|
structs::{DataRetention, Expression, Imap, Jmap, MtaStageAuth, MtaStageRcpt, Task},
|
||||||
},
|
},
|
||||||
types::duration::Duration,
|
types::duration::Duration,
|
||||||
};
|
};
|
||||||
@@ -46,6 +46,19 @@ const DAY: u64 = 86_400;
|
|||||||
pub async fn test(test: &mut TestServer) {
|
pub async fn test(test: &mut TestServer) {
|
||||||
println!("Running undelete tests...");
|
println!("Running undelete tests...");
|
||||||
let admin = test.account("[email protected]");
|
let admin = test.account("[email protected]");
|
||||||
|
// 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
|
let user = admin
|
||||||
.create_user_account("[email protected]", SECRET, "Undelete", &[], vec![])
|
.create_user_account("[email protected]", SECRET, "Undelete", &[], vec![])
|
||||||
.await;
|
.await;
|
||||||
|
|||||||
Reference in New Issue
Block a user