Skip to content

Commit 50009fc

Browse files
committed
UPSTREAM: <carry>: migrate bandrade test cases to OTE
1 parent e4f8db5 commit 50009fc

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
@@ -16,6 +16,23 @@
1616
"exclude": "topology==\"External\""
1717
}
1818
},
19+
{
20+
"name": "[sig-olmv1][Jira:OLM] cluster-olm-operator PolarionID:75877-[OTP]Make sure that rukpak is removed from payload",
21+
"originalName": "[sig-olmv1][Jira:OLM] cluster-olm-operator PolarionID:75877-Make sure that rukpak is removed from payload",
22+
"labels": {
23+
"Extended": {},
24+
"NonHyperShiftHOST": {},
25+
"original-name:[sig-olmv1][Jira:OLM] cluster-olm-operator PolarionID:75877-Make sure that rukpak is removed from payload": {}
26+
},
27+
"resources": {
28+
"isolation": {}
29+
},
30+
"source": "openshift:payload:olmv1",
31+
"lifecycle": "blocking",
32+
"environmentSelector": {
33+
"exclude": "topology==\"External\""
34+
}
35+
},
1936
{
2037
"name": "[sig-olmv1][Jira:OLM] clustercatalog PolarionID:69242-[OTP][Skipped:Disconnected]Catalogd deprecated package bundlemetadata catalogmetadata from clustercatalog CR",
2138
"originalName": "[sig-olmv1][Jira:OLM] clustercatalog PolarionID:69242-[Skipped:Disconnected]Catalogd deprecated package bundlemetadata catalogmetadata from clustercatalog CR",
@@ -50,6 +67,23 @@
5067
"exclude": "topology==\"External\""
5168
}
5269
},
70+
{
71+
"name": "[sig-olmv1][Jira:OLM] clustercatalog PolarionID:77413-[OTP][Level0][Skipped:Disconnected]Check if ClusterCatalog is in Serving properly",
72+
"originalName": "[sig-olmv1][Jira:OLM] clustercatalog PolarionID:77413-[Skipped:Disconnected]Check if ClusterCatalog is in Serving properly",
73+
"labels": {
74+
"Extended": {},
75+
"NonHyperShiftHOST": {},
76+
"original-name:[sig-olmv1][Jira:OLM] clustercatalog PolarionID:77413-[Skipped:Disconnected]Check if ClusterCatalog is in Serving properly": {}
77+
},
78+
"resources": {
79+
"isolation": {}
80+
},
81+
"source": "openshift:payload:olmv1",
82+
"lifecycle": "blocking",
83+
"environmentSelector": {
84+
"exclude": "topology==\"External\""
85+
}
86+
},
5387
{
5488
"name": "[sig-olmv1][Jira:OLM] clusterextension PolarionID:83069-[OTP]olmv1 static networkpolicy.",
5589
"originalName": "[sig-olmv1][Jira:OLM] clusterextension PolarionID:83069-olmv1 static networkpolicy.",
@@ -102,6 +136,23 @@
102136
"exclude": "topology==\"External\""
103137
}
104138
},
139+
{
140+
"name": "[sig-olmv1][Jira:OLM] clusterextension PolarionID:70723-[OTP][Skipped:Disconnected]olmv1 downgrade version",
141+
"originalName": "[sig-olmv1][Jira:OLM] clusterextension PolarionID:70723-[Skipped:Disconnected]olmv1 downgrade version",
142+
"labels": {
143+
"Extended": {},
144+
"NonHyperShiftHOST": {},
145+
"original-name:[sig-olmv1][Jira:OLM] clusterextension PolarionID:70723-[Skipped:Disconnected]olmv1 downgrade version": {}
146+
},
147+
"resources": {
148+
"isolation": {}
149+
},
150+
"source": "openshift:payload:olmv1",
151+
"lifecycle": "blocking",
152+
"environmentSelector": {
153+
"exclude": "topology==\"External\""
154+
}
155+
},
105156
{
106157
"name": "[sig-olmv1][Jira:OLM] clusterextension PolarionID:75492-[OTP][Level0]cluster extension can not be installed with wrong sa or insufficient permission sa",
107158
"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
@@ -40,4 +40,14 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] cluster-olm-operator", g.Label("NonHyp
4040
}
4141
})
4242

43+
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() {
44+
g.By("1) Ensure bundledeployments.core.rukpak.io CRD is not installed")
45+
_, err := oc.AsAdmin().WithoutNamespace().Run("get").Args("crd", "bundledeployments.core.rukpak.io").Output()
46+
o.Expect(err).To(o.HaveOccurred())
47+
48+
g.By("2) Ensure openshift-rukpak namespace is not created")
49+
_, err = oc.AsAdmin().WithoutNamespace().Run("get").Args("ns", "openshift-rukpak").Output()
50+
o.Expect(err).To(o.HaveOccurred())
51+
})
52+
4353
})

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,21 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] clustercatalog", g.Label("NonHyperShif
125125
clustercatalog.CheckClusterCatalogCondition(oc, "Progressing", "message", "manifest unknown", 5, 90, 0)
126126
})
127127

128+
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() {
129+
g.By("Verify built-in ClusterCatalogs report Serving=True")
130+
checks := []olmv1util.CheckDescription{
131+
olmv1util.NewCheck("expect", exutil.AsAdmin, exutil.WithoutNamespace, exutil.Contain, "True", exutil.Ok,
132+
[]string{"clustercatalog", "openshift-certified-operators", `-o=jsonpath={.status.conditions[?(@.type=="Serving")].status}`}),
133+
olmv1util.NewCheck("expect", exutil.AsAdmin, exutil.WithoutNamespace, exutil.Contain, "True", exutil.Ok,
134+
[]string{"clustercatalog", "openshift-community-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-redhat-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-marketplace", `-o=jsonpath={.status.conditions[?(@.type=="Serving")].status}`}),
139+
}
140+
for _, check := range checks {
141+
check.Check(oc)
142+
}
143+
})
144+
128145
})

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

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

298298
})
299299

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

0 commit comments

Comments
 (0)