Test that Pinniped APis do not have short names, either.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
Matt Moyer 2020-11-12 16:49:21 -06:00
parent 7f2c43cd62
commit f1696411d9
No known key found for this signature in database
GPG Key ID: EAE88AD172C5AE2D

View File

@ -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) {