From da3c05426a835582d163c80f086cfee5a9ba88a6 Mon Sep 17 00:00:00 2001 From: chrislu Date: Tue, 25 Nov 2025 12:40:44 -0800 Subject: [PATCH] Update s3api_object_handlers_copy_test.go --- weed/s3api/s3api_object_handlers_copy_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/weed/s3api/s3api_object_handlers_copy_test.go b/weed/s3api/s3api_object_handlers_copy_test.go index 733a146aa..018c9f270 100644 --- a/weed/s3api/s3api_object_handlers_copy_test.go +++ b/weed/s3api/s3api_object_handlers_copy_test.go @@ -546,6 +546,11 @@ func TestCleanupVersioningMetadata(t *testing.T) { t.Errorf("Expected key %s to be removed from destination metadata, but it's still present", key) } } + + // Verify the count matches to ensure no extra keys are present + if len(dstMetadata) != len(tc.expectedKeys) { + t.Errorf("Expected %d metadata keys, but got %d. Extra keys might be present.", len(tc.expectedKeys), len(dstMetadata)) + } }) } }