diff --git a/testsupport/wait/member.go b/testsupport/wait/member.go index a8276b039..db6d36b5b 100644 --- a/testsupport/wait/member.go +++ b/testsupport/wait/member.go @@ -2449,6 +2449,28 @@ func (a *MemberAwaitility) verifyValidatingWebhookConfig(t *testing.T, ca []byte assert.Equal(t, []string{"*"}, ssprequestRule.APIVersions) assert.Equal(t, []string{"ssps"}, ssprequestRule.Resources) assert.Equal(t, admv1.NamespacedScope, *ssprequestRule.Scope) + + vmrequestWebhook := actualValWbhConf.Webhooks[3] + assert.Equal(t, "users.virtualmachines.validating.webhook.sandbox", vmrequestWebhook.Name) + assert.Equal(t, []string{"v1"}, vmrequestWebhook.AdmissionReviewVersions) + assert.Equal(t, admv1.SideEffectClassNone, *vmrequestWebhook.SideEffects) + assert.Equal(t, int32(5), *vmrequestWebhook.TimeoutSeconds) + assert.Equal(t, admv1.Fail, *vmrequestWebhook.FailurePolicy) + assert.Equal(t, admv1.Equivalent, *vmrequestWebhook.MatchPolicy) + assert.Equal(t, codereadyToolchainProviderLabel, vmrequestWebhook.NamespaceSelector.MatchLabels) + assert.Equal(t, ca, vmrequestWebhook.ClientConfig.CABundle) + assert.Equal(t, "member-operator-webhook", vmrequestWebhook.ClientConfig.Service.Name) + assert.Equal(t, a.Namespace, vmrequestWebhook.ClientConfig.Service.Namespace) + assert.Equal(t, "/validate-vmrequests", *vmrequestWebhook.ClientConfig.Service.Path) + assert.Equal(t, int32(443), *vmrequestWebhook.ClientConfig.Service.Port) + require.Len(t, vmrequestWebhook.Rules, 1) + + vmrequestRule := vmrequestWebhook.Rules[0] + assert.Equal(t, []admv1.OperationType{admv1.Create, admv1.Update}, vmrequestRule.Operations) + assert.Equal(t, []string{"kubevirt.io"}, vmrequestRule.APIGroups) + assert.Equal(t, []string{"*"}, vmrequestRule.APIVersions) + assert.Equal(t, []string{"virtualmachines"}, vmrequestRule.Resources) + assert.Equal(t, admv1.NamespacedScope, *vmrequestRule.Scope) } func (a *MemberAwaitility) WaitForAutoscalingBufferApp(t *testing.T) {