Skip to content

Commit 4eba59b

Browse files
committed
combine default service-account test cases
1 parent 6f7f8c9 commit 4eba59b

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

test/e2e/authorization.go

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -372,21 +372,9 @@ var _ = g.Describe("Authorization [RBAC] [Zalando]", func() {
372372
// g.It("should allow to create Pods", func() {})
373373
})
374374

375-
g.When("the default service account is in default namespace", func() {
375+
g.When("the service account is the default service account", func() {
376376
g.BeforeEach(func() {
377-
tc.data.users = []string{"system:serviceaccount:default:default"}
378-
})
379-
g.It("should deny to list StatefulSets", func() {
380-
tc.data.resources = []string{"apps/statefulsets"}
381-
tc.data.verbs = []string{"list"}
382-
tc.run(context.TODO(), cs, false)
383-
gomega.Expect(tc.output.passed).To(gomega.BeTrue(), tc.output.String())
384-
})
385-
})
386-
387-
g.When("the default service account is in non-default namespace", func() {
388-
g.BeforeEach(func() {
389-
tc.data.users = []string{"system:serviceaccount:non-default:default"}
377+
tc.data.users = []string{"system:serviceaccount:default:default", "system:serviceaccount:non-default:default"}
390378
})
391379
g.It("should deny to list StatefulSets", func() {
392380
tc.data.resources = []string{"apps/statefulsets"}

0 commit comments

Comments
 (0)