Skip to content

Commit 4962df7

Browse files
committed
fix default namespace and pv as global resource
1 parent 1646c06 commit 4962df7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/e2e/authorization.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ var (
3232
"apps/deployments/scale",
3333
"apps/statefulsets/scale",
3434
"services",
35-
"persistentvolumes",
3635
"persistentvolumeclaims",
3736
"configmaps",
3837
}
@@ -42,6 +41,7 @@ var (
4241
"namespaces",
4342
"rbac.authorization.k8s.io/clusterroles",
4443
"storage.k8s.io/storageclasses",
44+
"storage.k8s.io/persistentvolumes",
4545
"apiextensions.k8s.io/customresourcedefinitions",
4646
}
4747
// a slice of "get", "list", "watch" verbs
@@ -54,11 +54,11 @@ var (
5454
allOperations = append(readOperations, writeOperations...)
5555

5656
// a slice representing all namespaces with respect to the test cases
57-
// "" represents the default namespace
57+
// "default" is the default namespace
5858
// "teapot" is a random namespace
5959
// "visibility" is a namespace where collaborators will have access
6060
// "kube-system" is a namespace where only administrators will have access
61-
allNamespaces = []string{"", "teapot", "visibility", "kube-system"}
61+
allNamespaces = []string{"default", "teapot", "visibility", "kube-system"}
6262
)
6363

6464
var _ = g.Describe("Authorization [RBAC] [Zalando]", func() {
@@ -226,7 +226,7 @@ var _ = g.Describe("Authorization [RBAC] [Zalando]", func() {
226226
gomega.Expect(tc.output.passed).To(gomega.BeTrue(), tc.output.String())
227227
})
228228
g.It("should allow write access in namespaces other than kube-system and visibility", func() {
229-
tc.data.namespaces = []string{"", "teapot"}
229+
tc.data.namespaces = []string{"default", "teapot"}
230230
tc.run(context.TODO(), cs, true)
231231
gomega.Expect(tc.output.passed).To(gomega.BeTrue(), tc.output.String())
232232
})
@@ -321,7 +321,7 @@ var _ = g.Describe("Authorization [RBAC] [Zalando]", func() {
321321
gomega.Expect(tc.output.passed).To(gomega.BeTrue(), tc.output.String())
322322
})
323323
g.It("should allow write access in namespaces other than kube-system", func() {
324-
tc.data.namespaces = []string{"", "teapot"}
324+
tc.data.namespaces = []string{"default", "teapot"}
325325
tc.run(context.TODO(), cs, true)
326326
gomega.Expect(tc.output.passed).To(gomega.BeTrue(), tc.output.String())
327327
})

0 commit comments

Comments
 (0)