Skip to content

Commit 7357586

Browse files
committed
UPSTREAM: <carry>: migrate bandrade test cases to OTE
1 parent 93bf7ab commit 7357586

File tree

4 files changed

+138
-0
lines changed

4 files changed

+138
-0
lines changed

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

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,23 @@
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+
"originalName": "[sig-olmv1][Jira:OLM] cluster-olm-operator PolarionID:75877-Make sure that rukpak is removed from payload",
52+
"labels": {
53+
"Extended": {},
54+
"NonHyperShiftHOST": {},
55+
"original-name:[sig-olmv1][Jira:OLM] cluster-olm-operator PolarionID:75877-Make sure that rukpak is removed from payload": {}
56+
},
57+
"resources": {
58+
"isolation": {}
59+
},
60+
"source": "openshift:payload:olmv1",
61+
"lifecycle": "blocking",
62+
"environmentSelector": {
63+
"exclude": "topology==\"External\""
64+
}
65+
},
4966
{
5067
"name": "[sig-olmv1][Jira:OLM] clustercatalog PolarionID:69242-[OTP][Skipped:Disconnected]Catalogd deprecated package bundlemetadata catalogmetadata from clustercatalog CR",
5168
"originalName": "[sig-olmv1][Jira:OLM] clustercatalog PolarionID:69242-[Skipped:Disconnected]Catalogd deprecated package bundlemetadata catalogmetadata from clustercatalog CR",
@@ -322,6 +339,23 @@
322339
"exclude": "topology==\"External\""
323340
}
324341
},
342+
{
343+
"name": "[sig-olmv1][Jira:OLM] clustercatalog PolarionID:77413-[OTP][Level0][Skipped:Disconnected]Check if ClusterCatalog is in Serving properly",
344+
"originalName": "[sig-olmv1][Jira:OLM] clustercatalog PolarionID:77413-[Skipped:Disconnected]Check if ClusterCatalog is in Serving properly",
345+
"labels": {
346+
"Extended": {},
347+
"NonHyperShiftHOST": {},
348+
"original-name:[sig-olmv1][Jira:OLM] clustercatalog PolarionID:77413-[Skipped:Disconnected]Check if ClusterCatalog is in Serving properly": {}
349+
},
350+
"resources": {
351+
"isolation": {}
352+
},
353+
"source": "openshift:payload:olmv1",
354+
"lifecycle": "blocking",
355+
"environmentSelector": {
356+
"exclude": "topology==\"External\""
357+
}
358+
},
325359
{
326360
"name": "[sig-olmv1][Jira:OLM] clusterextension PolarionID:83069-[OTP]olmv1 static networkpolicy.",
327361
"originalName": "[sig-olmv1][Jira:OLM] clusterextension PolarionID:83069-olmv1 static networkpolicy.",
@@ -374,6 +408,23 @@
374408
"exclude": "topology==\"External\""
375409
}
376410
},
411+
{
412+
"name": "[sig-olmv1][Jira:OLM] clusterextension PolarionID:70723-[OTP][Skipped:Disconnected]olmv1 downgrade version",
413+
"originalName": "[sig-olmv1][Jira:OLM] clusterextension PolarionID:70723-[Skipped:Disconnected]olmv1 downgrade version",
414+
"labels": {
415+
"Extended": {},
416+
"NonHyperShiftHOST": {},
417+
"original-name:[sig-olmv1][Jira:OLM] clusterextension PolarionID:70723-[Skipped:Disconnected]olmv1 downgrade version": {}
418+
},
419+
"resources": {
420+
"isolation": {}
421+
},
422+
"source": "openshift:payload:olmv1",
423+
"lifecycle": "blocking",
424+
"environmentSelector": {
425+
"exclude": "topology==\"External\""
426+
}
427+
},
377428
{
378429
"name": "[sig-olmv1][Jira:OLM] clusterextension PolarionID:75492-[OTP][Level0]cluster extension can not be installed with wrong sa or insufficient permission sa",
379430
"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", g.Label("original-name:[sig-olmv1][Jira:OLM] cluster-olm-operator PolarionID:75877-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, 90, 0)
128128
})
129129

130+
g.It("PolarionID:77413-[OTP][Level0][Skipped:Disconnected]Check if ClusterCatalog is in Serving properly", g.Label("original-name:[sig-olmv1][Jira:OLM] clustercatalog PolarionID:77413-[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", g.Label("original-name:[sig-olmv1][Jira:OLM] clusterextension PolarionID:70723-[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)