Skip to content

Commit e170abf

Browse files
authored
Use different WebhookConfiguration name in every webhook e2e test spec (#2811)
* Use different webhook configuration names in every test spec
1 parent 5d8e06d commit e170abf

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/e2e/webhook/webhook.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ var _ = ginkgo.Describe("AdmissionWebhook", ginkgo.Ordered, func() {
8888
namespace based on the webhook namespace selector MUST be allowed.
8989
*/
9090
ginkgo.It("should be able to deny pod and configmap creation", func() {
91-
webhookCleanup := registerWebhook(f, uniqueName, certCtx, servicePort, ns)
91+
const (
92+
webhookConfigurationName = "deny-pod-and-configmap-creation"
93+
)
94+
webhookCleanup := registerWebhook(f, webhookConfigurationName, certCtx, servicePort, ns)
9295
defer webhookCleanup()
9396
testWebhook(f, ns)
9497
})
@@ -100,7 +103,10 @@ var _ = ginkgo.Describe("AdmissionWebhook", ginkgo.Ordered, func() {
100103
Attempts to attach MUST be denied.
101104
*/
102105
ginkgo.It("should be able to deny attaching pod", func() {
103-
webhookCleanup := registerWebhookForAttachingPod(f, uniqueName, certCtx, servicePort, ns)
106+
const (
107+
webhookConfigurationName = "deny-attaching-to-pod"
108+
)
109+
webhookCleanup := registerWebhookForAttachingPod(f, webhookConfigurationName, certCtx, servicePort, ns)
104110
defer webhookCleanup()
105111
testAttachingPodWebhook(f, ns)
106112
})

0 commit comments

Comments
 (0)