Skip to content

Commit

Permalink
Merge branch 'master' into ASC-393
Browse files Browse the repository at this point in the history
  • Loading branch information
MatousJobanek authored Oct 9, 2023
2 parents 848b336 + 78157ad commit c3bd405
Showing 1 changed file with 21 additions and 23 deletions.
44 changes: 21 additions & 23 deletions testsupport/wait/member.go
Original file line number Diff line number Diff line change
Expand Up @@ -2318,29 +2318,27 @@ func (a *MemberAwaitility) verifyValidatingWebhookConfig(t *testing.T, ca []byte
assert.Equal(t, []string{"checlusters"}, checlusterRule.Resources)
assert.Equal(t, admv1.NamespacedScope, *checlusterRule.Scope)

// TODO: uncomment once: https://github.com/codeready-toolchain/member-operator/pull/470
// is merged.
//spacebindingrequestWebhook := actualValWbhConf.Webhooks[2]
//assert.Equal(t, "users.spacebindingrequests.webhook.sandbox", spacebindingrequestWebhook.Name)
//assert.Equal(t, []string{"v1"}, spacebindingrequestWebhook.AdmissionReviewVersions)
//assert.Equal(t, admv1.SideEffectClassNone, *spacebindingrequestWebhook.SideEffects)
//assert.Equal(t, int32(5), *spacebindingrequestWebhook.TimeoutSeconds)
//assert.Equal(t, admv1.Ignore, *spacebindingrequestWebhook.FailurePolicy)
//assert.Equal(t, admv1.Equivalent, *spacebindingrequestWebhook.MatchPolicy)
//assert.Equal(t, codereadyToolchainProviderLabel, spacebindingrequestWebhook.NamespaceSelector.MatchLabels)
//assert.Equal(t, ca, spacebindingrequestWebhook.ClientConfig.CABundle)
//assert.Equal(t, "member-operator-webhook", spacebindingrequestWebhook.ClientConfig.Service.Name)
//assert.Equal(t, a.Namespace, spacebindingrequestWebhook.ClientConfig.Service.Namespace)
//assert.Equal(t, "/validate-spacebindingrequests", *spacebindingrequestWebhook.ClientConfig.Service.Path)
//assert.Equal(t, int32(443), *spacebindingrequestWebhook.ClientConfig.Service.Port)
//require.Len(t, spacebindingrequestWebhook.Rules, 1)
//
//spacebindingrequestRule := spacebindingrequestWebhook.Rules[0]
//assert.Equal(t, []admv1.OperationType{admv1.Create, admv1.Update}, spacebindingrequestRule.Operations)
//assert.Equal(t, []string{"toolchain.dev.openshift.com"}, spacebindingrequestRule.APIGroups)
//assert.Equal(t, []string{"v1alpha1"}, spacebindingrequestRule.APIVersions)
//assert.Equal(t, []string{"spacebindingrequests"}, spacebindingrequestRule.Resources)
//assert.Equal(t, admv1.NamespacedScope, *spacebindingrequestRule.Scope)
spacebindingrequestWebhook := actualValWbhConf.Webhooks[2]
assert.Equal(t, "users.spacebindingrequests.webhook.sandbox", spacebindingrequestWebhook.Name)
assert.Equal(t, []string{"v1"}, spacebindingrequestWebhook.AdmissionReviewVersions)
assert.Equal(t, admv1.SideEffectClassNone, *spacebindingrequestWebhook.SideEffects)
assert.Equal(t, int32(5), *spacebindingrequestWebhook.TimeoutSeconds)
assert.Equal(t, admv1.Fail, *spacebindingrequestWebhook.FailurePolicy)
assert.Equal(t, admv1.Equivalent, *spacebindingrequestWebhook.MatchPolicy)
assert.Equal(t, codereadyToolchainProviderLabel, spacebindingrequestWebhook.NamespaceSelector.MatchLabels)
assert.Equal(t, ca, spacebindingrequestWebhook.ClientConfig.CABundle)
assert.Equal(t, "member-operator-webhook", spacebindingrequestWebhook.ClientConfig.Service.Name)
assert.Equal(t, a.Namespace, spacebindingrequestWebhook.ClientConfig.Service.Namespace)
assert.Equal(t, "/validate-spacebindingrequests", *spacebindingrequestWebhook.ClientConfig.Service.Path)
assert.Equal(t, int32(443), *spacebindingrequestWebhook.ClientConfig.Service.Port)
require.Len(t, spacebindingrequestWebhook.Rules, 1)

spacebindingrequestRule := spacebindingrequestWebhook.Rules[0]
assert.Equal(t, []admv1.OperationType{admv1.Create, admv1.Update}, spacebindingrequestRule.Operations)
assert.Equal(t, []string{"toolchain.dev.openshift.com"}, spacebindingrequestRule.APIGroups)
assert.Equal(t, []string{"v1alpha1"}, spacebindingrequestRule.APIVersions)
assert.Equal(t, []string{"spacebindingrequests"}, spacebindingrequestRule.Resources)
assert.Equal(t, admv1.NamespacedScope, *spacebindingrequestRule.Scope)

}

Expand Down

0 comments on commit c3bd405

Please sign in to comment.