diff --git a/test/extended/olm/olmv1.go b/test/extended/olm/olmv1.go index a2b39e3855c1..4d0e901fa77e 100644 --- a/test/extended/olm/olmv1.go +++ b/test/extended/olm/olmv1.go @@ -23,15 +23,13 @@ const ( typeIncompatibelOperatorsUpgradeable = "InstalledOLMOperatorsUpgradeable" ) -var _ = g.Describe("[sig-olmv1] OLMv1 CRDs", func() { +var _ = g.Describe("[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 CRDs", func() { defer g.GinkgoRecover() oc := exutil.NewCLIWithoutNamespace("default") g.It("should be installed", func(ctx g.SpecContext) { // Check for tech preview, if this is not tech preview, bail - if !exutil.IsTechPreviewNoUpgrade(ctx, oc.AdminConfigClient()) { - g.Skip("Test only runs in tech-preview") - } + checkTestSkip(ctx, oc) // supports multiple versions during transision providedAPIs := []struct { @@ -69,15 +67,13 @@ var _ = g.Describe("[sig-olmv1] OLMv1 CRDs", func() { }) }) -var _ = g.Describe("[sig-olmv1] OLMv1 Catalogs", func() { +var _ = g.Describe("[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 Catalogs", func() { defer g.GinkgoRecover() oc := exutil.NewCLIWithoutNamespace("default") g.It("should be installed", func(ctx g.SpecContext) { // Check for tech preview, if this is not tech preview, bail - if !exutil.IsTechPreviewNoUpgrade(ctx, oc.AdminConfigClient()) { - g.Skip("Test only runs in tech-preview") - } + checkTestSkip(ctx, oc) providedCatalogs := []string{ "openshift-certified-operators", @@ -100,7 +96,7 @@ var _ = g.Describe("[sig-olmv1] OLMv1 Catalogs", func() { }) }) -var _ = g.Describe("[sig-olmv1][Serial] OLMv1 operator installation", func() { +var _ = g.Describe("[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 operator installation", func() { defer g.GinkgoRecover() var ( @@ -128,9 +124,7 @@ var _ = g.Describe("[sig-olmv1][Serial] OLMv1 operator installation", func() { version = "3.13.0" ) // Check for tech preview, if this is not tech preview, bail - if !exutil.IsTechPreviewNoUpgrade(ctx, oc.AdminConfigClient()) { - g.Skip("Test only runs in tech-preview") - } + checkTestSkip(ctx, oc) ns := oc.Namespace() g.By(fmt.Sprintf("Updating the namespace to: %q", ns)) @@ -249,3 +243,14 @@ func WaitForCondition(oc *exutil.CLI, status bool) (done bool, err error) { } return true, nil } + +func checkTestSkip(ctx context.Context, oc *exutil.CLI) { + // Hardcoded until openshift/api is updated: + // import ( configv1 "github.com/openshift/api/config/v1" ) + // configv1.ClusterVersionCapabilityOperatorLifecycleManagerV1 + cap, err := exutil.IsCapabilityEnabled(oc, "OperatorLifecycleManagerV1") + o.Expect(err).NotTo(o.HaveOccurred()) + if !cap { + g.Skip("Test only runs with OLMv1 capability") + } +} diff --git a/test/extended/util/annotate/generated/zz_generated.annotations.go b/test/extended/util/annotate/generated/zz_generated.annotations.go index 32423807ea65..8d11299e8b0e 100644 --- a/test/extended/util/annotate/generated/zz_generated.annotations.go +++ b/test/extended/util/annotate/generated/zz_generated.annotations.go @@ -1703,13 +1703,13 @@ var Annotations = map[string]string{ "[sig-node][apigroup:config.openshift.io] CPU Partitioning node validation should have correct cpuset and cpushare set in crio containers": " [Suite:openshift/conformance/parallel]", - "[sig-olmv1] OLMv1 CRDs should be installed": " [Suite:openshift/conformance/parallel]", + "[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 CRDs should be installed": " [Suite:openshift/conformance/parallel]", - "[sig-olmv1] OLMv1 Catalogs should be installed": " [Suite:openshift/conformance/parallel]", + "[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 Catalogs should be installed": " [Suite:openshift/conformance/parallel]", - "[sig-olmv1][Serial] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed": " [Suite:openshift/conformance/serial]", + "[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed": " [Suite:openshift/conformance/parallel]", - "[sig-olmv1][Serial] OLMv1 operator installation should install a cluster extension": " [Suite:openshift/conformance/serial]", + "[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 operator installation should install a cluster extension": " [Suite:openshift/conformance/parallel]", "[sig-operator] OLM should Implement packages API server and list packagemanifest info with namespace not NULL [apigroup:packages.operators.coreos.com]": " [Skipped:NoOptionalCapabilities] [Suite:openshift/conformance/parallel]", diff --git a/zz_generated.manifests/test-reporting.yaml b/zz_generated.manifests/test-reporting.yaml index a0becec6225c..7644e8ea1a3a 100644 --- a/zz_generated.manifests/test-reporting.yaml +++ b/zz_generated.manifests/test-reporting.yaml @@ -244,6 +244,14 @@ spec: - testName: '[sig-network][OCPFeatureGate:NetworkSegmentation][Feature:UserDefinedPrimaryNetworks] when using openshift ovn-kubernetes when primary network exist, UserDefinedNetwork status should report not-ready' + - featureGate: NewOLM + tests: + - testName: '[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 CRDs should be installed' + - testName: '[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 Catalogs should be installed' + - testName: '[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 operator installation should + block cluster upgrades if an incompatible operator is installed' + - testName: '[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 operator installation should + install a cluster extension' - featureGate: PersistentIPsForVirtualization tests: - testName: '[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration]