From 719a42f9937425e102b064bb7becb10796c4c10d Mon Sep 17 00:00:00 2001 From: alliasgher Date: Sat, 25 Apr 2026 20:48:02 +0500 Subject: [PATCH] test(api): cover additionalTags keys with spaces Existing 'spaces allowed' test only verifies a tag *value* with a space; the key path is not exercised. Add a regression case for keys with spaces ("Patch Group") in both v1beta1 and v1beta2 so future regex churn cannot silently break the case from #4642 again. --- api/v1beta1/tags_test.go | 7 +++++++ api/v1beta2/tags_test.go | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/api/v1beta1/tags_test.go b/api/v1beta1/tags_test.go index 36b2cb2612..7b6c852677 100644 --- a/api/v1beta1/tags_test.go +++ b/api/v1beta1/tags_test.go @@ -186,6 +186,13 @@ func TestTagsValidate(t *testing.T) { }, expected: nil, }, + { + name: "no errors - spaces allowed in key", + self: Tags{ + "Patch Group": "validValue", + }, + expected: nil, + }, { name: "key cannot be empty", self: Tags{ diff --git a/api/v1beta2/tags_test.go b/api/v1beta2/tags_test.go index a0504eb986..04af9ffade 100644 --- a/api/v1beta2/tags_test.go +++ b/api/v1beta2/tags_test.go @@ -186,6 +186,13 @@ func TestTagsValidate(t *testing.T) { }, expected: nil, }, + { + name: "no errors - spaces allowed in key", + self: Tags{ + "Patch Group": "validValue", + }, + expected: nil, + }, { name: "key cannot be empty", self: Tags{