Skip to content

Commit f694c9b

Browse files
Merge pull request #30658 from rikatz/ne-2376
NE-2376: Remove restriction of unmanaged x-k8s.io
2 parents 06e7030 + af2709b commit f694c9b

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

test/extended/router/gatewayapi.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package router
22

33
import (
44
"context"
5+
"slices"
56
"strings"
67

78
g "github.com/onsi/ginkgo/v2"
@@ -77,17 +78,14 @@ var _ = g.Describe("[sig-network][OCPFeatureGate:GatewayAPI][Feature:Router][api
7778
if crd.Spec.Group == "gateway.networking.x-k8s.io" {
7879
e2e.Failf("Found unexpected CRD named: %v", crd.Name)
7980
}
81+
// Check standard group GWAPI CRDs to ensure they are not in the experimental channel
82+
if slices.Contains(crdNames, crd.Name) {
83+
if channel, ok := crd.Annotations["gateway.networking.k8s.io/channel"]; ok && channel == "experimental" {
84+
e2e.Failf("Found experimental channel CRD: %v (expected standard channel)", crd.Name)
85+
}
86+
}
8087
}
8188
})
82-
83-
g.It("and ensure CRD of experimental group can not be created", func() {
84-
expCRDName := "xlistenersets.gateway.networking.x-k8s.io"
85-
g.By("Try to create CRD of experimental group and fail")
86-
expCRD := buildGWAPICRDFromName(expCRDName)
87-
_, err := oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Create(context.Background(), expCRD, metav1.CreateOptions{})
88-
o.Expect(err).To(o.HaveOccurred())
89-
o.Expect(err.Error()).To(o.ContainSubstring(errorMessage))
90-
})
9189
})
9290
})
9391

0 commit comments

Comments
 (0)