Always pass spec to CreateTestWebhookAuthenticator

This commit is contained in:
Benjamin A. Petersen
2024-03-18 16:14:42 -04:00
parent a45a537cdb
commit 097e6d5340
9 changed files with 29 additions and 31 deletions

View File

@@ -177,7 +177,6 @@ func CreateTestWebhookAuthenticator(
webhookSpec *auth1alpha1.WebhookAuthenticatorSpec,
expectedStatus auth1alpha1.WebhookAuthenticatorPhase) corev1.TypedLocalObjectReference {
t.Helper()
testEnv := IntegrationEnv(t)
client := NewConciergeClientset(t)
webhooks := client.AuthenticationV1alpha1().WebhookAuthenticators()
@@ -185,10 +184,6 @@ func CreateTestWebhookAuthenticator(
createContext, cancel := context.WithTimeout(ctx, time.Minute)
defer cancel()
if webhookSpec == nil {
webhookSpec = &testEnv.TestWebhook
}
webhook, err := webhooks.Create(createContext, &auth1alpha1.WebhookAuthenticator{
ObjectMeta: testObjectMeta(t, "webhook"),
Spec: *webhookSpec,