From e6234d3714ef101509dbfd21f482a54804355730 Mon Sep 17 00:00:00 2001 From: Zhengchao An Date: Mon, 31 Aug 2026 08:03:07 +0800 Subject: [PATCH] test(ecstore): pin default bucket config bytes (#6920) --- crates/ecstore/src/store/mod.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/crates/ecstore/src/store/mod.rs b/crates/ecstore/src/store/mod.rs index c07a25fab..53c5346e4 100644 --- a/crates/ecstore/src/store/mod.rs +++ b/crates/ecstore/src/store/mod.rs @@ -1205,6 +1205,23 @@ mod tests { use serial_test::serial; use tempfile::TempDir; + #[test] + fn g_d2_008_default_versioning_config_keeps_persisted_bytes() { + let bytes = crate::bucket::utils::serialize::(&ENABLED_VERSIONING_CONFIG) + .expect("the default Versioning configuration must serialize"); + assert_eq!(bytes, b"Enabled"); + } + + #[test] + fn g_d2_009_default_object_lock_config_keeps_persisted_bytes() { + let bytes = crate::bucket::utils::serialize::(&ENABLED_OBJECT_LOCK_CONFIG) + .expect("the default Object Lock configuration must serialize"); + assert_eq!( + bytes, + b"Enabled" + ); + } + #[tokio::test] async fn test_get_disk_infos() { let disks = vec![None, None]; // Empty disks for testing