From 8e251ee5e3c0b9b2c14154c9428ad7fd3d80dd96 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 10 Dec 2021 12:05:44 +0100 Subject: [PATCH] add format test for KObjs 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. --- klog_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/klog_test.go b/klog_test.go index 2f65ef894..59e6e0cde 100644 --- a/klog_test.go +++ b/klog_test.go @@ -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 {