@@ -26,6 +26,13 @@ import (
26
26
gatewayapiclientset "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned"
27
27
)
28
28
29
+ var (
30
+ requiredCapabilities = []configv1.ClusterVersionCapability {
31
+ configv1 .ClusterVersionCapabilityMarketplace ,
32
+ configv1 .ClusterVersionCapabilityOperatorLifecycleManager ,
33
+ }
34
+ )
35
+
29
36
var _ = g .Describe ("[sig-network-edge][OCPFeatureGate:GatewayAPIController][Feature:Router][apigroup:gateway.networking.k8s.io]" , g .Ordered , g .Serial , func () {
30
37
defer g .GinkgoRecover ()
31
38
var (
@@ -73,14 +80,18 @@ var _ = g.Describe("[sig-network-edge][OCPFeatureGate:GatewayAPIController][Feat
73
80
g .Skip (fmt .Sprintf ("Skipping on non cloud platform type %q" , platformType ))
74
81
}
75
82
83
+ // GatewayAPIController relies on OSSM OLM operator.
84
+ // Skipping on clusters which don't have capabilities required
85
+ // to install an OLM operator.
86
+ exutil .SkipIfMissingCapabilities (oc , requiredCapabilities ... )
87
+
76
88
gwapiClient := gatewayapiclientset .NewForConfigOrDie (oc .AdminConfig ())
77
89
// create the default gatewayClass
78
90
gatewayClass := buildGatewayClass (gatewayClassName , gatewayClassControllerName )
79
91
_ , err = gwapiClient .GatewayV1 ().GatewayClasses ().Create (context .TODO (), gatewayClass , metav1.CreateOptions {})
80
92
if err != nil && ! apierrors .IsAlreadyExists (err ) {
81
93
e2e .Failf ("Failed to create GatewayClass %q" , gatewayClassName )
82
94
}
83
-
84
95
})
85
96
86
97
g .AfterAll (func () {
0 commit comments