fix: repair main build (swift clippy assert + ecstore multipart test ctx) (#4441)

* fix(swift): replace assert!(false) with panic! in expiration_worker test

clippy::assertions_on_constants fails the swift clippy CI job under -D warnings.

* fix(ecstore): add missing ctx field to multipart lock test store

The multipart list-parts lock test (#4437) constructs ECStore without the
ctx field added by the Phase 5 InstanceContext work (backlog#939). Both
landed on main independently, leaving a semantic conflict that breaks the
ecstore lib-test build (E0063). Adopt the process bootstrap context,
matching the existing bootstrap_ctx() test in store/mod.rs.
This commit is contained in:
Zhengchao An
2026-07-08 16:01:12 +08:00
committed by GitHub
parent 93ffbdb9bd
commit b06f3df6b6
2 changed files with 2 additions and 4 deletions
+1
View File
@@ -417,6 +417,7 @@ mod tests {
decommission_cancelers: RwLock::new(Vec::new()), decommission_cancelers: RwLock::new(Vec::new()),
start_gate: Mutex::new(()), start_gate: Mutex::new(()),
pool_meta_save_gate: Mutex::new(()), pool_meta_save_gate: Mutex::new(()),
ctx: crate::runtime::instance::bootstrap_ctx(),
} }
} }
@@ -984,10 +984,7 @@ mod tests {
let tracked = match worker.scan_all_objects_with_backend(&backend).await { let tracked = match worker.scan_all_objects_with_backend(&backend).await {
Ok(tracked) => tracked, Ok(tracked) => tracked,
Err(err) => { Err(err) => panic!("scan candidates should be tracked: {err}"),
assert!(false, "scan candidates should be tracked: {err}");
0
}
}; };
assert_eq!(tracked, 2); assert_eq!(tracked, 2);