Skip to content
Merged
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
15 changes: 12 additions & 3 deletions test/extended/router/gatewayapicontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ var _ = g.Describe("[sig-network-edge][OCPFeatureGate:GatewayAPIController][Feat
g.Skip("Skipping on OKD cluster as OSSM is not available as a community operator")
}

// skip non clould platforms since gateway needs LB service
skipGatewayIfNonCloudPlatform(oc)
skipGatewayForUnsupportedPlatform(oc)
if !isNoOLMFeatureGateEnabled(oc) {
// GatewayAPIController without GatewayAPIWithoutOLM featuregate
// relies on OSSM OLM operator.
Expand Down Expand Up @@ -611,7 +610,10 @@ var _ = g.Describe("[sig-network-edge][OCPFeatureGate:GatewayAPIController][Feat
})
})

func skipGatewayIfNonCloudPlatform(oc *exutil.CLI) {
// skipGatewayForUnsupportedPlatform skips gateway API tests on non-cloud
// platforms (gateway needs LB service) and on dual-stack clusters (dual-stack
// support is not yet declared).
func skipGatewayForUnsupportedPlatform(oc *exutil.CLI) {
infra, err := oc.AdminConfigClient().ConfigV1().Infrastructures().Get(context.Background(), "cluster", metav1.GetOptions{})
o.Expect(err).NotTo(o.HaveOccurred())
o.Expect(infra).NotTo(o.BeNil())
Expand All @@ -625,6 +627,13 @@ func skipGatewayIfNonCloudPlatform(oc *exutil.CLI) {
default:
g.Skip(fmt.Sprintf("Skipping on non cloud platform type %q", platformType))
}

if infra.Status.PlatformStatus.AWS != nil {
ipFamily := infra.Status.PlatformStatus.AWS.IPFamily
if ipFamily == configv1.DualStackIPv4Primary || ipFamily == configv1.DualStackIPv6Primary {
g.Skip("Skipping Gateway API tests on dual-stack cluster")
}
}
}

func isNoOLMFeatureGateEnabled(oc *exutil.CLI) bool {
Expand Down