Skip to content
Closed
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
29 changes: 17 additions & 12 deletions test/extended/olm/olmv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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",
Expand All @@ -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 (
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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")
}
}

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

8 changes: 8 additions & 0 deletions zz_generated.manifests/test-reporting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down