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{