From 72fd7339c9cf73a8dbb8cfcc1dc8cd5ea5be8693 Mon Sep 17 00:00:00 2001 From: Zhengchao An Date: Sat, 15 Aug 2026 08:32:10 +0800 Subject: [PATCH] test(utils): allow ephemeral port reuse (#6122) * test(utils): allow ephemeral port reuse * test(kms): allow any ciphertext prefix --- crates/kms/tests/behavior_backup.rs | 2 -- crates/utils/src/net.rs | 3 --- 2 files changed, 5 deletions(-) diff --git a/crates/kms/tests/behavior_backup.rs b/crates/kms/tests/behavior_backup.rs index 598ec4eca..65e58fed8 100644 --- a/crates/kms/tests/behavior_backup.rs +++ b/crates/kms/tests/behavior_backup.rs @@ -225,8 +225,6 @@ async fn nothing_readable_leaves_the_bundle_unwrapped() { "artifact {} carries the raw on-disk record", artifact.path ); - // A cheap structural check too: an encrypted payload is not JSON. - assert_ne!(payload.first(), Some(&b'{'), "artifact {} looks like plaintext JSON", artifact.path); } // The manifest itself is not encrypted, so assert directly that it carries diff --git a/crates/utils/src/net.rs b/crates/utils/src/net.rs index d9bf106f5..873a6d940 100644 --- a/crates/utils/src/net.rs +++ b/crates/utils/src/net.rs @@ -659,9 +659,6 @@ mod test { // Port should be in valid range (u16 max is always <= 65535) assert!(port1 > 0); assert!(port2 > 0); - - // Different calls should typically return different ports - assert_ne!(port1, port2); } #[test]