Skip to content

Commit 57ce8af

Browse files
Merge pull request openshift#562 from bandrade/bandrade-olmv1-ote
OCPQE-30674: migrate bandrade's OLMv1 test cases to OTE
2 parents 2a569f3 + de93981 commit 57ce8af

File tree

4 files changed

+133
-0
lines changed

4 files changed

+133
-0
lines changed

openshift/tests-extension/.openshift-tests-extension/openshift_payload_olmv1.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,21 @@
4646
"exclude": "topology==\"External\""
4747
}
4848
},
49+
{
50+
"name": "[sig-olmv1][Jira:OLM] cluster-olm-operator PolarionID:75877-[OTP]Make sure that rukpak is removed from payload",
51+
"labels": {
52+
"Extended": {},
53+
"NonHyperShiftHOST": {}
54+
},
55+
"resources": {
56+
"isolation": {}
57+
},
58+
"source": "openshift:payload:olmv1",
59+
"lifecycle": "blocking",
60+
"environmentSelector": {
61+
"exclude": "topology==\"External\""
62+
}
63+
},
4964
{
5065
"name": "[sig-olmv1][Jira:OLM] clustercatalog PolarionID:69242-[OTP][Skipped:Disconnected]Catalogd deprecated package bundlemetadata catalogmetadata from clustercatalog CR",
5166
"originalName": "[sig-olmv1][Jira:OLM] clustercatalog PolarionID:69242-[Skipped:Disconnected]Catalogd deprecated package bundlemetadata catalogmetadata from clustercatalog CR",
@@ -82,6 +97,22 @@
8297
"exclude": "topology==\"External\""
8398
}
8499
},
100+
{
101+
"name": "[sig-olmv1][Jira:OLM] clustercatalog PolarionID:77413-[OTP][Level0][Skipped:Disconnected]Check if ClusterCatalog is in Serving properly",
102+
"labels": {
103+
"ClusterCatalog": {},
104+
"Extended": {},
105+
"NonHyperShiftHOST": {}
106+
},
107+
"resources": {
108+
"isolation": {}
109+
},
110+
"source": "openshift:payload:olmv1",
111+
"lifecycle": "blocking",
112+
"environmentSelector": {
113+
"exclude": "topology==\"External\""
114+
}
115+
},
85116
{
86117
"name": "[sig-olmv1][Jira:OLM] clustercatalog PolarionID:69123-[OTP][Skipped:Disconnected]Catalogd clustercatalog offer the operator content through http server",
87118
"labels": {
@@ -374,6 +405,21 @@
374405
"exclude": "topology==\"External\""
375406
}
376407
},
408+
{
409+
"name": "[sig-olmv1][Jira:OLM] clusterextension PolarionID:70723-[OTP][Skipped:Disconnected]olmv1 downgrade version",
410+
"labels": {
411+
"Extended": {},
412+
"NonHyperShiftHOST": {}
413+
},
414+
"resources": {
415+
"isolation": {}
416+
},
417+
"source": "openshift:payload:olmv1",
418+
"lifecycle": "blocking",
419+
"environmentSelector": {
420+
"exclude": "topology==\"External\""
421+
}
422+
},
377423
{
378424
"name": "[sig-olmv1][Jira:OLM] clusterextension PolarionID:75492-[OTP][Level0]cluster extension can not be installed with wrong sa or insufficient permission sa",
379425
"originalName": "[sig-olmv1][Jira:OLM] clusterextension PolarionID:75492-[Skipped:Disconnected]cluster extension can not be installed with wrong sa or insufficient permission sa",

openshift/tests-extension/test/qe/specs/olmv1.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,14 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] cluster-olm-operator", g.Label("NonHyp
152152
g.By("3) test SUCCESS")
153153
})
154154

155+
g.It("PolarionID:75877-[OTP]Make sure that rukpak is removed from payload", func() {
156+
g.By("1) Ensure bundledeployments.core.rukpak.io CRD is not installed")
157+
_, err := oc.AsAdmin().WithoutNamespace().Run("get").Args("crd", "bundledeployments.core.rukpak.io").Output()
158+
o.Expect(err).To(o.HaveOccurred())
159+
160+
g.By("2) Ensure openshift-rukpak namespace is not created")
161+
_, err = oc.AsAdmin().WithoutNamespace().Run("get").Args("ns", "openshift-rukpak").Output()
162+
o.Expect(err).To(o.HaveOccurred())
163+
})
164+
155165
})

openshift/tests-extension/test/qe/specs/olmv1_cc.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,23 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] clustercatalog", g.Label("NonHyperShif
127127
clustercatalog.CheckClusterCatalogCondition(oc, "Progressing", "message", "manifest unknown", 5, 180, 0)
128128
})
129129

130+
g.It("PolarionID:77413-[OTP][Level0][Skipped:Disconnected]Check if ClusterCatalog is in Serving properly", func() {
131+
g.By("Verify built-in ClusterCatalogs report Serving=True")
132+
checks := []olmv1util.CheckDescription{
133+
olmv1util.NewCheck("expect", exutil.AsAdmin, exutil.WithoutNamespace, exutil.Contain, "True", exutil.Ok,
134+
[]string{"clustercatalog", "openshift-certified-operators", `-o=jsonpath={.status.conditions[?(@.type=="Serving")].status}`}),
135+
olmv1util.NewCheck("expect", exutil.AsAdmin, exutil.WithoutNamespace, exutil.Contain, "True", exutil.Ok,
136+
[]string{"clustercatalog", "openshift-community-operators", `-o=jsonpath={.status.conditions[?(@.type=="Serving")].status}`}),
137+
olmv1util.NewCheck("expect", exutil.AsAdmin, exutil.WithoutNamespace, exutil.Contain, "True", exutil.Ok,
138+
[]string{"clustercatalog", "openshift-redhat-operators", `-o=jsonpath={.status.conditions[?(@.type=="Serving")].status}`}),
139+
olmv1util.NewCheck("expect", exutil.AsAdmin, exutil.WithoutNamespace, exutil.Contain, "True", exutil.Ok,
140+
[]string{"clustercatalog", "openshift-redhat-marketplace", `-o=jsonpath={.status.conditions[?(@.type=="Serving")].status}`}),
141+
}
142+
for _, check := range checks {
143+
check.Check(oc)
144+
}
145+
})
146+
130147
g.It("PolarionID:69123-[OTP][Skipped:Disconnected]Catalogd clustercatalog offer the operator content through http server", func() {
131148
var (
132149
baseDir = exutil.FixturePath("testdata", "olm")

openshift/tests-extension/test/qe/specs/olmv1_ce.go

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,66 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] clusterextension", g.Label("NonHyperSh
299299

300300
})
301301

302+
g.It("PolarionID:70723-[OTP][Skipped:Disconnected]olmv1 downgrade version", func() {
303+
olmv1util.ValidateAccessEnvironment(oc)
304+
var (
305+
ns = "ns-70723"
306+
sa = "sa70723"
307+
baseDir = exutil.FixturePath("testdata", "olm")
308+
clustercatalogTemplate = filepath.Join(baseDir, "clustercatalog.yaml")
309+
clusterextensionTemplate = filepath.Join(baseDir, "clusterextension.yaml")
310+
saClusterRoleBindingTemplate = filepath.Join(baseDir, "sa-admin.yaml")
311+
saCrb = olmv1util.SaCLusterRolebindingDescription{
312+
Name: sa,
313+
Namespace: ns,
314+
Template: saClusterRoleBindingTemplate,
315+
}
316+
clustercatalog = olmv1util.ClusterCatalogDescription{
317+
Name: "clustercatalog-70723",
318+
Imageref: "quay.io/openshifttest/nginxolm-operator-index:nginxolm70723",
319+
Template: clustercatalogTemplate,
320+
}
321+
clusterextension = olmv1util.ClusterExtensionDescription{
322+
Name: "clusterextension-70723",
323+
InstallNamespace: ns,
324+
PackageName: "nginx70723",
325+
Channel: "candidate-v2",
326+
Version: "2.2.1",
327+
SaName: sa,
328+
Template: clusterextensionTemplate,
329+
}
330+
)
331+
332+
g.By("Create namespace")
333+
defer func() {
334+
_ = oc.WithoutNamespace().AsAdmin().Run("delete").Args("ns", ns, "--ignore-not-found", "--force").Execute()
335+
}()
336+
err := oc.WithoutNamespace().AsAdmin().Run("create").Args("ns", ns).Execute()
337+
o.Expect(err).NotTo(o.HaveOccurred())
338+
o.Expect(olmv1util.Appearance(oc, exutil.Appear, "ns", ns)).To(o.BeTrue())
339+
340+
g.By("Create SA for clusterextension")
341+
defer saCrb.Delete(oc)
342+
saCrb.Create(oc)
343+
344+
g.By("Create clustercatalog")
345+
defer clustercatalog.Delete(oc)
346+
clustercatalog.Create(oc)
347+
348+
g.By("Install version 2.2.1")
349+
defer clusterextension.Delete(oc)
350+
clusterextension.Create(oc)
351+
o.Expect(clusterextension.InstalledBundle).To(o.ContainSubstring("2.2.1"))
352+
353+
g.By("Attempt to downgrade to version 2.0.0 with CatalogProvided policy and expect failure")
354+
clusterextension.Patch(oc, `{"spec":{"source":{"catalog":{"version": "2.0.0"}}}}`)
355+
clusterextension.CheckClusterExtensionCondition(oc, "Progressing", "message", "error upgrading", 3, 150, 0)
356+
357+
g.By("Change UpgradeConstraintPolicy to SelfCertified and allow downgrade")
358+
clusterextension.Patch(oc, `{"spec":{"source":{"catalog":{"upgradeConstraintPolicy": "SelfCertified"}}}}`)
359+
clusterextension.WaitClusterExtensionVersion(oc, "2.0.0")
360+
})
361+
302362
g.It("PolarionID:75492-[OTP][Level0]cluster extension can not be installed with wrong sa or insufficient permission sa", g.Label("original-name:[sig-olmv1][Jira:OLM] clusterextension PolarionID:75492-[Skipped:Disconnected]cluster extension can not be installed with wrong sa or insufficient permission sa"), func() {
303363
exutil.SkipForSNOCluster(oc)
304364
olmv1util.ValidateAccessEnvironment(oc)

0 commit comments

Comments
 (0)