From ed2e11ee2e28af4ea4e2a91d7f81b826ee380104 Mon Sep 17 00:00:00 2001 From: overtrue Date: Sat, 1 Aug 2026 13:56:33 +0800 Subject: [PATCH] test(health): pin the readiness default at compile time --- rustfs/src/server/health.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/rustfs/src/server/health.rs b/rustfs/src/server/health.rs index 2863828af..5cac23e3f 100644 --- a/rustfs/src/server/health.rs +++ b/rustfs/src/server/health.rs @@ -492,13 +492,11 @@ mod tests { }); } - #[test] - fn the_kms_readiness_check_stays_opt_in() { - assert!( - !rustfs_config::DEFAULT_HEALTH_COMPAT_KMS_READY_CHECK_ENABLE, - "flipping this default is a deployment behaviour change, not a code change" - ); - } + /// Flipping this default is a deployment behaviour change, not a code + /// change: it would start failing readiness on clusters that never asked + /// for the KMS to gate it. Pinned at compile time so the constant cannot + /// drift without this line being edited too. + const _: () = assert!(!rustfs_config::DEFAULT_HEALTH_COMPAT_KMS_READY_CHECK_ENABLE); #[test] #[serial]