Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions test/extended/router/gatewayapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package router

import (
"context"
"slices"
"strings"

g "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -77,17 +78,14 @@ var _ = g.Describe("[sig-network][OCPFeatureGate:GatewayAPI][Feature:Router][api
if crd.Spec.Group == "gateway.networking.x-k8s.io" {
e2e.Failf("Found unexpected CRD named: %v", crd.Name)
}
// Check standard group GWAPI CRDs to ensure they are not in the experimental channel
if slices.Contains(crdNames, crd.Name) {
if channel, ok := crd.Annotations["gateway.networking.k8s.io/channel"]; ok && channel == "experimental" {
e2e.Failf("Found experimental channel CRD: %v (expected standard channel)", crd.Name)
}
}
}
})

g.It("and ensure CRD of experimental group can not be created", func() {
expCRDName := "xlistenersets.gateway.networking.x-k8s.io"
g.By("Try to create CRD of experimental group and fail")
expCRD := buildGWAPICRDFromName(expCRDName)
_, err := oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Create(context.Background(), expCRD, metav1.CreateOptions{})
o.Expect(err).To(o.HaveOccurred())
o.Expect(err.Error()).To(o.ContainSubstring(errorMessage))
})
})
})

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions zz_generated.manifests/test-reporting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,6 @@ spec:
to the ''sub'' claim in the access token from the IdP'
- featureGate: GatewayAPI
tests:
- testName: '[sig-network][OCPFeatureGate:GatewayAPI][Feature:Router][apigroup:gateway.networking.k8s.io]
Verify Gateway API CRDs and ensure CRD of experimental group can not be created'
- testName: '[sig-network][OCPFeatureGate:GatewayAPI][Feature:Router][apigroup:gateway.networking.k8s.io]
Verify Gateway API CRDs and ensure CRD of experimental group is not installed'
- testName: '[sig-network][OCPFeatureGate:GatewayAPI][Feature:Router][apigroup:gateway.networking.k8s.io]
Expand Down