@@ -207,10 +207,18 @@ var _ = g.Describe("Authorization [RBAC] [Zalando]", func() {
207
207
tc .data .resources = namespacedResources
208
208
tc .data .verbs = writeOperations
209
209
})
210
- // These should be covered by the admission-controller tests.
211
- // They're written here for completeness.
212
- g .It ("should deny write access in kube-system and visibility namespaces" , func () {})
213
- g .It ("should allow write access in namespaces other than kube-system and visibility" , func () {})
210
+ // These should be covered by the admission-controller tests. They will
211
+ // be skipped here. Later when we cover everything with RBAC, we can run them again.
212
+ g .It ("should deny write access in kube-system and visibility namespaces" , func () {
213
+ tc .data .namespaces = []string {"kube-system" , "visibility" }
214
+ tc .run (context .TODO (), cs , false )
215
+ gomega .Expect (tc .output .passed ).To (gomega .BeTrue (), tc .output .String ())
216
+ })
217
+ g .It ("should allow write access in namespaces other than kube-system and visibility" , func () {
218
+ tc .data .namespaces = []string {"" , "teapot" }
219
+ tc .run (context .TODO (), cs , true )
220
+ gomega .Expect (tc .output .passed ).To (gomega .BeTrue (), tc .output .String ())
221
+ })
214
222
})
215
223
g .When ("the resource is a global resource" , func () {
216
224
g .BeforeEach (func () {
@@ -279,6 +287,8 @@ var _ = g.Describe("Authorization [RBAC] [Zalando]", func() {
279
287
tc .run (context .TODO (), cs , true )
280
288
gomega .Expect (tc .output .passed ).To (gomega .BeTrue (), tc .output .String ())
281
289
})
290
+ // This should be covered by the admission-controller tests. It will
291
+ // be skipped here. Later when we cover everything with RBAC, we can run it again.
282
292
g .It ("should deny deletion of kube-system or visibility namespaces" , func () {
283
293
tc .data .resources = []string {"namespaces" }
284
294
tc .data .names = []string {"kube-system" , "visibility" }
@@ -292,9 +302,13 @@ var _ = g.Describe("Authorization [RBAC] [Zalando]", func() {
292
302
tc .data .resources = namespacedResources
293
303
tc .data .verbs = writeOperations
294
304
})
295
- // This should be covered by the admission-controller tests.
296
- // It's written here for completeness.
297
- g .It ("should deny write access in kube-system namespace" , func () {})
305
+ // This should be covered by the admission-controller tests. It will
306
+ // be skipped here. Later when we cover everything with RBAC, we can run it again.
307
+ g .It ("should deny write access in kube-system namespace" , func () {
308
+ tc .data .namespaces = []string {"kube-system" }
309
+ tc .run (context .TODO (), cs , false )
310
+ gomega .Expect (tc .output .passed ).To (gomega .BeTrue (), tc .output .String ())
311
+ })
298
312
g .It ("should allow write access in namespaces other than kube-system" , func () {
299
313
tc .data .namespaces = []string {"" , "teapot" }
300
314
tc .run (context .TODO (), cs , true )
0 commit comments