Skip to content

Commit

Permalink
Add skip condition for Cluster-CSI-Snapshot-Controller-Operator feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Phaow committed Mar 5, 2024
1 parent e66eced commit f448830
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/extended/storage/csi_snapshot_controller_operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
e2e "k8s.io/kubernetes/test/e2e/framework"

configv1 "github.com/openshift/api/config/v1"
ocpv1 "github.com/openshift/api/config/v1"
exutil "github.com/openshift/origin/test/extended/util"
)

Expand All @@ -27,6 +28,15 @@ var _ = g.Describe("[sig-storage][Feature:Cluster-CSI-Snapshot-Controller-Operat
if CSISnapshotEnabled, _ := exutil.IsCapabilityEnabled(oc, configv1.ClusterVersionCapabilityCSISnapshot); !CSISnapshotEnabled {
g.Skip("Skip for CSISnapshot capability is not enabled on the test cluster!")
}

controlPlaneTopology, err := exutil.GetControlPlaneTopology(oc)
o.Expect(err).NotTo(o.HaveOccurred())

// HyperShift the CSISnapshot controllers runs on management cluster
if *controlPlaneTopology == ocpv1.ExternalTopologyMode {
g.Skip("Skipped: Clusters with external control plane topology Cluster-CSI-Snapshot-Controller-Operator runs on management cluster")
}

})

g.AfterEach(func() {
Expand Down

0 comments on commit f448830

Please sign in to comment.