Skip to content

Commit

Permalink
Remove kubernetesimagepuller webhook test
Browse files Browse the repository at this point in the history
Signed-off-by: David Kwon <[email protected]>
  • Loading branch information
dkwon17 committed Jan 18, 2024
1 parent 5c2eefd commit b63f12f
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions testsupport/wait/member.go
Original file line number Diff line number Diff line change
Expand Up @@ -2349,29 +2349,7 @@ func (a *MemberAwaitility) verifyValidatingWebhookConfig(t *testing.T, ca []byte
assert.Equal(t, []string{"rolebindings"}, rolebindingRule.Resources)
assert.Equal(t, admv1.NamespacedScope, *rolebindingRule.Scope)

k8sImagePullerWebhook := actualValWbhConf.Webhooks[1]
assert.Equal(t, "users.kubernetesimagepullers.webhook.sandbox", k8sImagePullerWebhook.Name)
assert.Equal(t, []string{"v1"}, k8sImagePullerWebhook.AdmissionReviewVersions)
assert.Equal(t, admv1.SideEffectClassNone, *k8sImagePullerWebhook.SideEffects)
assert.Equal(t, int32(5), *k8sImagePullerWebhook.TimeoutSeconds)
assert.Equal(t, admv1.Fail, *k8sImagePullerWebhook.FailurePolicy)
assert.Equal(t, admv1.Equivalent, *k8sImagePullerWebhook.MatchPolicy)
assert.Equal(t, codereadyToolchainProviderLabel, k8sImagePullerWebhook.NamespaceSelector.MatchLabels)
assert.Equal(t, ca, k8sImagePullerWebhook.ClientConfig.CABundle)
assert.Equal(t, "member-operator-webhook", k8sImagePullerWebhook.ClientConfig.Service.Name)
assert.Equal(t, a.Namespace, k8sImagePullerWebhook.ClientConfig.Service.Namespace)
assert.Equal(t, "/validate-users-kubernetesimagepullers", *k8sImagePullerWebhook.ClientConfig.Service.Path)
assert.Equal(t, int32(443), *k8sImagePullerWebhook.ClientConfig.Service.Port)
require.Len(t, k8sImagePullerWebhook.Rules, 1)

k8sImagePullerRule := k8sImagePullerWebhook.Rules[0]
assert.Equal(t, []admv1.OperationType{admv1.Create}, k8sImagePullerRule.Operations)
assert.Equal(t, []string{"che.eclipse.org"}, k8sImagePullerRule.APIGroups)
assert.Equal(t, []string{"v1alpha1"}, k8sImagePullerRule.APIVersions)
assert.Equal(t, []string{"kubernetesimagepullers"}, k8sImagePullerRule.Resources)
assert.Equal(t, admv1.NamespacedScope, *k8sImagePullerRule.Scope)

spacebindingrequestWebhook := actualValWbhConf.Webhooks[2]
spacebindingrequestWebhook := actualValWbhConf.Webhooks[1]
assert.Equal(t, "users.spacebindingrequests.webhook.sandbox", spacebindingrequestWebhook.Name)
assert.Equal(t, []string{"v1"}, spacebindingrequestWebhook.AdmissionReviewVersions)
assert.Equal(t, admv1.SideEffectClassNone, *spacebindingrequestWebhook.SideEffects)
Expand Down

0 comments on commit b63f12f

Please sign in to comment.