refactor(e2e): label selector for storage, ingress, podpriority classes

This commit is contained in:
Dario Tranchitella
2022-12-27 17:53:17 +01:00
parent 93fbca9b18
commit 462d7213b9
5 changed files with 32 additions and 22 deletions
+7 -5
View File
@@ -35,12 +35,14 @@ var _ = Describe("when Tenant handles Ingress classes with extensions/v1beta1",
},
},
IngressOptions: capsulev1beta2.IngressOptions{
AllowedClasses: &api.AllowedListSpec{
Exact: []string{
"nginx",
"haproxy",
AllowedClasses: &api.SelectorAllowedListSpec{
AllowedListSpec: api.AllowedListSpec{
Exact: []string{
"nginx",
"haproxy",
},
Regex: "^oil-.*$",
},
Regex: "^oil-.*$",
},
},
},
+7 -5
View File
@@ -34,12 +34,14 @@ var _ = Describe("when Tenant handles Ingress classes with networking.k8s.io/v1"
},
},
IngressOptions: capsulev1beta2.IngressOptions{
AllowedClasses: &api.AllowedListSpec{
Exact: []string{
"nginx",
"haproxy",
AllowedClasses: &api.SelectorAllowedListSpec{
AllowedListSpec: api.AllowedListSpec{
Exact: []string{
"nginx",
"haproxy",
},
Regex: "^oil-.*$",
},
Regex: "^oil-.*$",
},
},
},
+6 -4
View File
@@ -33,10 +33,12 @@ var _ = Describe("when Tenant owner interacts with the webhooks", func() {
Kind: "User",
},
},
StorageClasses: &api.AllowedListSpec{
Exact: []string{
"cephfs",
"glusterfs",
StorageClasses: &api.SelectorAllowedListSpec{
AllowedListSpec: api.AllowedListSpec{
Exact: []string{
"cephfs",
"glusterfs",
},
},
},
LimitRanges: api.LimitRangesSpec{Items: []corev1.LimitRangeSpec{
+5 -3
View File
@@ -30,9 +30,11 @@ var _ = Describe("enforcing a Priority Class", func() {
Kind: "User",
},
},
PriorityClasses: &api.AllowedListSpec{
Exact: []string{"gold"},
Regex: "pc\\-\\w+",
PriorityClasses: &api.SelectorAllowedListSpec{
AllowedListSpec: api.AllowedListSpec{
Exact: []string{"gold"},
Regex: "pc\\-\\w+",
},
},
},
}
+7 -5
View File
@@ -31,12 +31,14 @@ var _ = Describe("when Tenant handles Storage classes", func() {
Kind: "User",
},
},
StorageClasses: &api.AllowedListSpec{
Exact: []string{
"cephfs",
"glusterfs",
StorageClasses: &api.SelectorAllowedListSpec{
AllowedListSpec: api.AllowedListSpec{
Exact: []string{
"cephfs",
"glusterfs",
},
Regex: "^oil-.*$",
},
Regex: "^oil-.*$",
},
},
}