From f1696411d981ac27764af4194cb3bf2a015aef0f Mon Sep 17 00:00:00 2001 From: Matt Moyer Date: Thu, 12 Nov 2020 16:49:21 -0600 Subject: [PATCH] Test that Pinniped APis do not have short names, either. Signed-off-by: Matt Moyer --- test/integration/kube_api_discovery_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/integration/kube_api_discovery_test.go b/test/integration/kube_api_discovery_test.go index 259eb4fb..5a2bd8f7 100644 --- a/test/integration/kube_api_discovery_test.go +++ b/test/integration/kube_api_discovery_test.go @@ -163,6 +163,18 @@ func TestGetAPIResourceList(t *testing.T) { } }) + t.Run("Pinniped resources do not have short names", func(t *testing.T) { + t.Parallel() + for _, r := range resources { + if !strings.Contains(r.GroupVersion, "pinniped.dev") { + continue + } + for _, a := range r.APIResources { + assert.Empty(t, a.ShortNames, "expected resource %q not to have any short names", a.Name) + } + } + }) + for _, tt := range tests { tt := tt t.Run(tt.group.Name, func(t *testing.T) {