Skip to content

Commit acd2bdf

Browse files
committed
handle skipped tests better
1 parent cbce361 commit acd2bdf

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

test/e2e/authorization.go

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -225,17 +225,11 @@ var _ = g.Describe("Authorization [RBAC] [Zalando]", func() {
225225
tc.data.resources = namespacedResources
226226
tc.data.verbs = writeOperations
227227
})
228-
// These should be covered by the admission-controller tests. They will
229-
// be skipped here. Later when we cover everything with RBAC, we can run them again.
230228
g.It("should deny write access in kube-system and visibility namespaces", func() {
231-
tc.data.namespaces = []string{"kube-system", "visibility"}
232-
tc.run(context.TODO(), cs, false)
233-
gomega.Expect(tc.output.passed).To(gomega.BeTrue(), tc.output.String())
229+
g.Skip("handled by admission-controller")
234230
})
235231
g.It("should allow write access in namespaces other than kube-system and visibility", func() {
236-
tc.data.namespaces = []string{"default", "teapot"}
237-
tc.run(context.TODO(), cs, true)
238-
gomega.Expect(tc.output.passed).To(gomega.BeTrue(), tc.output.String())
232+
g.Skip("handled by admission-controller")
239233
})
240234
})
241235
g.When("the resource is a global resource", func() {
@@ -305,27 +299,17 @@ var _ = g.Describe("Authorization [RBAC] [Zalando]", func() {
305299
tc.run(context.TODO(), cs, true)
306300
gomega.Expect(tc.output.passed).To(gomega.BeTrue(), tc.output.String())
307301
})
308-
// This should be covered by the admission-controller tests. It will
309-
// be skipped here. Later when we cover everything with RBAC, we can run it again.
310302
g.It("should deny deletion of kube-system or visibility namespaces", func() {
311-
tc.data.resources = []string{"namespaces"}
312-
tc.data.names = []string{"kube-system", "visibility"}
313-
tc.data.verbs = []string{"delete"}
314-
tc.run(context.TODO(), cs, false)
315-
gomega.Expect(tc.output.passed).To(gomega.BeTrue(), tc.output.String())
303+
g.Skip("handled by admission-controller")
316304
})
317305

318306
g.When("the resource is a namespaced resource", func() {
319307
g.BeforeEach(func() {
320308
tc.data.resources = namespacedResources
321309
tc.data.verbs = writeOperations
322310
})
323-
// This should be covered by the admission-controller tests. It will
324-
// be skipped here. Later when we cover everything with RBAC, we can run it again.
325311
g.It("should deny write access in kube-system namespace", func() {
326-
tc.data.namespaces = []string{"kube-system"}
327-
tc.run(context.TODO(), cs, false)
328-
gomega.Expect(tc.output.passed).To(gomega.BeTrue(), tc.output.String())
312+
g.Skip("handled by admission-controller")
329313
})
330314
g.It("should allow write access in namespaces other than kube-system", func() {
331315
tc.data.namespaces = []string{"default", "teapot"}

test/e2e/run_e2e.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ if [ "$e2e" = true ]; then
185185
ginkgo -procs=25 -flake-attempts=2 \
186186
-focus="(\[Conformance\]|\[StatefulSetBasic\]|\[Feature:StatefulSet\]\s\[Slow\].*mysql|\[Zalando\])" \
187187
-skip="(\[Serial\]|validates.that.there.is.no.conflict.between.pods.with.same.hostPort.but.different.hostIP.and.protocol|Should.create.gradual.traffic.routes)" \
188-
-skip="should.deny.write.access.in.kube-system.and.visibility.namespaces|should.allow.write.access.in.namespaces.other.than.kube-system.and.visibility|should.deny.write.access.in.kube-system.namespace|should.deny.deletion.of.kube-system.or.visibility.namespaces" \
189188
"e2e.test" -- \
190189
-delete-namespace-on-failure=false \
191190
-non-blocking-taints=node.kubernetes.io/role,nvidia.com/gpu,dedicated \

0 commit comments

Comments
 (0)