diff --git a/staging/src/k8s.io/component-base/logs/json/json_test.go b/staging/src/k8s.io/component-base/logs/json/json_test.go index 76082a6309d..30c3cc3e48d 100644 --- a/staging/src/k8s.io/component-base/logs/json/json_test.go +++ b/staging/src/k8s.io/component-base/logs/json/json_test.go @@ -65,6 +65,11 @@ func TestZapLoggerInfo(t *testing.T) { names: []string{"hello", "world"}, format: "{\"ts\":%f,\"logger\":\"hello.world\",\"caller\":\"json/json_test.go:%d\",\"msg\":\"test for WithName\",\"v\":0}\n", }, + { + msg: "test for duplicate keys", + format: "{\"ts\":%f,\"caller\":\"json/json_test.go:%d\",\"msg\":\"test for duplicate keys\",\"v\":0,\"akey\":\"avalue\",\"akey\":\"anothervalue\"}\n", + keysValues: []interface{}{"akey", "avalue", "akey", "anothervalue"}, + }, } for _, data := range testDataInfo {