mirror of
https://github.com/minio/minio.git
synced 2025-01-23 12:43:16 -05:00
fix object lock metadata filter (#20011)
This commit is contained in:
parent
f365a98029
commit
68a9f521d5
@ -572,6 +572,7 @@ func FilterObjectLockMetadata(metadata map[string]string, filterRetention, filte
|
||||
dst := metadata
|
||||
var copied bool
|
||||
delKey := func(key string) {
|
||||
key = strings.ToLower(key)
|
||||
if _, ok := metadata[key]; !ok {
|
||||
return
|
||||
}
|
||||
|
@ -606,7 +606,7 @@ func TestFilterObjectLockMetadata(t *testing.T) {
|
||||
|
||||
for i, tt := range tests {
|
||||
o := FilterObjectLockMetadata(tt.metadata, tt.filterRetention, tt.filterLegalHold)
|
||||
if !reflect.DeepEqual(o, tt.metadata) {
|
||||
if !reflect.DeepEqual(o, tt.expected) {
|
||||
t.Fatalf("Case %d expected %v, got %v", i, tt.metadata, o)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user