Skip to content

Commit

Permalink
add format test for KObjs
Browse files Browse the repository at this point in the history
This wasn't covered before. At first glance the different formatting of the
individual objects (no quotation marks) looks a bit odd compared to how KObj is
formatted, but that's what we have right now.
  • Loading branch information
pohly committed Dec 10, 2021
1 parent fafe98e commit 8e251ee
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions klog_test.go
Expand Up @@ -1147,6 +1147,18 @@ No whitespace.`,
keysValues: []interface{}{"pod", KObj((*kMetadataMock)(nil)), "status", "ready"},
want: " pod=\"\" status=\"ready\"",
},
{
keysValues: []interface{}{"pods", KObjs([]kMetadataMock{
{
name: "kube-dns",
ns: "kube-system",
},
{
name: "mi-conf",
},
})},
want: " pods=[kube-system/kube-dns mi-conf]",
},
}

for _, d := range testKVList {
Expand Down

0 comments on commit 8e251ee

Please sign in to comment.