From 4edda802e5c6e6c00e57be837f8a3f4ab3465d59 Mon Sep 17 00:00:00 2001 From: Matt Moyer Date: Tue, 22 Sep 2020 11:23:34 -0500 Subject: [PATCH] Avoid a bug where long test names overflow the max label length. Annotations do not have this restriction, so we can put it there instead. This only currently occurs on clusters without the cluster signing capability (GKE). Signed-off-by: Matt Moyer --- test/library/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/library/client.go b/test/library/client.go index ec14c8cd2..73c10b1ca 100644 --- a/test/library/client.go +++ b/test/library/client.go @@ -156,10 +156,12 @@ func CreateTestWebhookIDP(ctx context.Context, t *testing.T) corev1.TypedLocalOb createContext, cancel := context.WithTimeout(ctx, 5*time.Second) defer cancel() + idp, err := webhooks.Create(createContext, &idpv1alpha1.WebhookIdentityProvider{ ObjectMeta: metav1.ObjectMeta{ GenerateName: "test-webhook-", - Labels: map[string]string{"pinniped.dev/test": t.Name()}, + Labels: map[string]string{"pinniped.dev/test": ""}, + Annotations: map[string]string{"pinniped.dev/testName": t.Name()}, }, Spec: idpv1alpha1.WebhookIdentityProviderSpec{ Endpoint: endpoint,