From d427f61f84b474f9d49086a7037a58dcd2a453c1 Mon Sep 17 00:00:00 2001 From: isarns Date: Sun, 12 Oct 2025 12:08:34 +0300 Subject: [PATCH] test(cmd-edit-add-label): add multiple labels without selector test --- kustomize/commands/edit/add/addmetadata_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/kustomize/commands/edit/add/addmetadata_test.go b/kustomize/commands/edit/add/addmetadata_test.go index 9a52e133e..1671bff75 100644 --- a/kustomize/commands/edit/add/addmetadata_test.go +++ b/kustomize/commands/edit/add/addmetadata_test.go @@ -375,6 +375,19 @@ func TestAddLabelWithoutSelector(t *testing.T) { }, }, }, + { + name: "add multiple labels without selector", + baseLabels: []types.Label{}, + options: addMetadataOptions{ + labelsWithoutSelector: true, + metadata: map[string]string{"test1": "a", "test2": "b"}, + }, + expected: []types.Label{ + { + Pairs: map[string]string{"test1": "a", "test2": "b"}, + }, + }, + }, { name: "overwrite label with same settings", baseLabels: []types.Label{