Skip to content

Commit f54ee1a

Browse files
committed
UPSTREAM: <carry>: migrate bandrade olmv0 tests
1 parent 7d2dd62 commit f54ee1a

File tree

4 files changed

+915
-98
lines changed

4 files changed

+915
-98
lines changed

tests-extension/.openshift-tests-extension/openshift_payload_olmv0.json

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,54 @@
282282
"exclude": "topology==\"External\""
283283
}
284284
},
285+
{
286+
"name": "[sig-operator][Jira:OLM] OLMv0 should PolarionID:24916-[OTP][Skipped:Disconnected]Operators in AllNamespaces should be granted namespace list",
287+
"labels": {
288+
"Extended": {}
289+
},
290+
"resources": {
291+
"isolation": {}
292+
},
293+
"source": "openshift:payload:olmv0",
294+
"lifecycle": "blocking",
295+
"environmentSelector": {}
296+
},
297+
{
298+
"name": "[sig-operator][Jira:OLM] OLMv0 should PolarionID:24771-[OTP]OLM should support for user defined ServiceAccount for OperatorGroup",
299+
"labels": {
300+
"Extended": {}
301+
},
302+
"resources": {
303+
"isolation": {}
304+
},
305+
"source": "openshift:payload:olmv0",
306+
"lifecycle": "blocking",
307+
"environmentSelector": {}
308+
},
309+
{
310+
"name": "[sig-operator][Jira:OLM] OLMv0 should PolarionID:24772-[OTP]OLM should support for user defined ServiceAccount for OperatorGroup with fine grained permission",
311+
"labels": {
312+
"Extended": {}
313+
},
314+
"resources": {
315+
"isolation": {}
316+
},
317+
"source": "openshift:payload:olmv0",
318+
"lifecycle": "blocking",
319+
"environmentSelector": {}
320+
},
321+
{
322+
"name": "[sig-operator][Jira:OLM] OLMv0 should PolarionID:24886-[OTP]OLM should support for user defined ServiceAccount permission changes",
323+
"labels": {
324+
"Extended": {}
325+
},
326+
"resources": {
327+
"isolation": {}
328+
},
329+
"source": "openshift:payload:olmv0",
330+
"lifecycle": "blocking",
331+
"environmentSelector": {}
332+
},
285333
{
286334
"name": "[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:68679-[OTP][Skipped:Disconnected]catalogsource with invalid name is created",
287335
"originalName": "[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:68679-[Skipped:Disconnected]catalogsource with invalid name is created",
@@ -350,6 +398,158 @@
350398
"exclude": "topology==\"External\""
351399
}
352400
},
401+
{
402+
"name": "[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:31693-[OTP][Skipped:Disconnected]Check CSV information on the PackageManifest",
403+
"labels": {
404+
"Extended": {}
405+
},
406+
"resources": {
407+
"isolation": {}
408+
},
409+
"source": "openshift:payload:olmv0",
410+
"lifecycle": "blocking",
411+
"environmentSelector": {}
412+
},
413+
{
414+
"name": "[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:54038-[OTP][Skipped:Disconnected]Comply with Operator Anti-Affinity definition",
415+
"labels": {
416+
"Extended": {}
417+
},
418+
"resources": {
419+
"isolation": {}
420+
},
421+
"source": "openshift:payload:olmv0",
422+
"lifecycle": "blocking",
423+
"environmentSelector": {}
424+
},
425+
{
426+
"name": "[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:54036-[OTP][Skipped:Disconnected]Comply with Operator NodeAffinity definition",
427+
"labels": {
428+
"Extended": {}
429+
},
430+
"resources": {
431+
"isolation": {}
432+
},
433+
"source": "openshift:payload:olmv0",
434+
"lifecycle": "blocking",
435+
"environmentSelector": {}
436+
},
437+
{
438+
"name": "[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:24850-[OTP]Allow users to edit the deployment of an active CSV",
439+
"labels": {
440+
"Extended": {}
441+
},
442+
"resources": {
443+
"isolation": {}
444+
},
445+
"source": "openshift:payload:olmv0",
446+
"lifecycle": "blocking",
447+
"environmentSelector": {}
448+
},
449+
{
450+
"name": "[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:24387-[OTP][Skipped:Disconnected]Any CRD upgrade is allowed if there is only one owner in a cluster [Serial][Disruptive]",
451+
"labels": {
452+
"Extended": {}
453+
},
454+
"resources": {
455+
"isolation": {}
456+
},
457+
"source": "openshift:payload:olmv0",
458+
"lifecycle": "blocking",
459+
"environmentSelector": {}
460+
},
461+
{
462+
"name": "[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:42970-[OTP]OperatorGroup status indicates cardinality conflicts - SingleNamespace",
463+
"labels": {
464+
"Extended": {}
465+
},
466+
"resources": {
467+
"isolation": {}
468+
},
469+
"source": "openshift:payload:olmv0",
470+
"lifecycle": "blocking",
471+
"environmentSelector": {}
472+
},
473+
{
474+
"name": "[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:42972-[OTP]OperatorGroup status should indicate if the SA named in spec not found",
475+
"labels": {
476+
"Extended": {}
477+
},
478+
"resources": {
479+
"isolation": {}
480+
},
481+
"source": "openshift:payload:olmv0",
482+
"lifecycle": "blocking",
483+
"environmentSelector": {}
484+
},
485+
{
486+
"name": "[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:21130-[OTP]Fetching non-existent PackageManifest should return 404",
487+
"originalName": "[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:21130-[OTP]Fetching non-existent `PackageManifest` should return 404",
488+
"labels": {
489+
"Extended": {},
490+
"original-name:[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:21130-[OTP]Fetching non-existent `PackageManifest` should return 404": {}
491+
},
492+
"resources": {
493+
"isolation": {}
494+
},
495+
"source": "openshift:payload:olmv0",
496+
"lifecycle": "blocking",
497+
"environmentSelector": {}
498+
},
499+
{
500+
"name": "[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:24057-[OTP]Have terminationMessagePolicy defined as FallbackToLogsOnError",
501+
"labels": {
502+
"Extended": {},
503+
"NonHyperShiftHOST": {}
504+
},
505+
"resources": {
506+
"isolation": {}
507+
},
508+
"source": "openshift:payload:olmv0",
509+
"lifecycle": "blocking",
510+
"environmentSelector": {
511+
"exclude": "topology==\"External\""
512+
}
513+
},
514+
{
515+
"name": "[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:49130-[OTP][Skipped:Disconnected]Default CatalogSources deployed by marketplace do not have toleration for tainted nodes",
516+
"labels": {
517+
"Extended": {},
518+
"NonHyperShiftHOST": {}
519+
},
520+
"resources": {
521+
"isolation": {}
522+
},
523+
"source": "openshift:payload:olmv0",
524+
"lifecycle": "blocking",
525+
"environmentSelector": {
526+
"exclude": "topology==\"External\""
527+
}
528+
},
529+
{
530+
"name": "[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:32613-[OTP][Skipped:Disconnected]Operators won't install if the CSV dependency is already installed",
531+
"labels": {
532+
"Extended": {}
533+
},
534+
"resources": {
535+
"isolation": {}
536+
},
537+
"source": "openshift:payload:olmv0",
538+
"lifecycle": "blocking",
539+
"environmentSelector": {}
540+
},
541+
{
542+
"name": "[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:24055-[OTP][Skipped:Disconnected]Check for defaultChannel mandatory field when having multiple channels",
543+
"labels": {
544+
"Extended": {}
545+
},
546+
"resources": {
547+
"isolation": {}
548+
},
549+
"source": "openshift:payload:olmv0",
550+
"lifecycle": "blocking",
551+
"environmentSelector": {}
552+
},
353553
{
354554
"name": "[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:72017-[OTP]-pod panics when EnsureSecretOwnershipAnnotations runs",
355555
"labels": {

tests-extension/pkg/bindata/qe/bindata.go

Lines changed: 71 additions & 98 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests-extension/test/qe/specs/olmv0_common.go

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,4 +876,92 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 should", func() {
876876
}
877877
})
878878

879+
g.It("PolarionID:24916-[OTP][Skipped:Disconnected]Operators in AllNamespaces should be granted namespace list", func() {
880+
buildDir := exutil.FixturePath("testdata", "olm")
881+
ogTemplate := filepath.Join(buildDir, "operatorgroup.yaml")
882+
883+
og := olmv0util.OperatorGroupDescription{
884+
Name: "og-24916",
885+
Namespace: oc.Namespace(),
886+
Template: ogTemplate,
887+
}
888+
og.Create(oc, g.CurrentSpecReport().FullText(), dr)
889+
890+
g.By("og should contain name of all namespaces")
891+
output, err := oc.AsAdmin().WithoutNamespace().Run("get").Args("og", og.Name, "-n", oc.Namespace(), "-o=jsonpath={.status.namespaces}").Output()
892+
o.Expect(err).NotTo(o.HaveOccurred())
893+
if !strings.Contains(output, "openshift-") || !strings.Contains(output, oc.Namespace()) {
894+
e2e.Failf("The namespaces of the OperatorGroup status is incorrect. It should contain all namespaces, but got: %s", output)
895+
}
896+
})
897+
898+
g.It("PolarionID:24771-[OTP]OLM should support for user defined ServiceAccount for OperatorGroup", func() {
899+
buildDir := exutil.FixturePath("testdata", "olm")
900+
ogTemplate := filepath.Join(buildDir, "operatorgroup-serviceaccount.yaml")
901+
902+
og := olmv0util.OperatorGroupDescription{
903+
Name: "og-24771",
904+
Namespace: oc.Namespace(),
905+
Template: ogTemplate,
906+
ServiceAccountName: "scoped-24771",
907+
}
908+
909+
g.By("Create OperatorGroup")
910+
og.Create(oc, g.CurrentSpecReport().FullText(), dr)
911+
912+
g.By("Check OperatorGroup Status")
913+
olmv0util.NewCheck("expect", exutil.AsAdmin, exutil.WithoutNamespace, exutil.Compare, "ServiceAccountNotFound", exutil.Ok, []string{"og", og.Name, "-n", og.Namespace, "-o=jsonpath={.status.conditions..reason}"}).Check(oc)
914+
})
915+
916+
g.It("PolarionID:24772-[OTP]OLM should support for user defined ServiceAccount for OperatorGroup with fine grained permission", func() {
917+
buildDir := exutil.FixturePath("testdata", "olm")
918+
ogTemplate := filepath.Join(buildDir, "operatorgroup-serviceaccount.yaml")
919+
og := olmv0util.OperatorGroupDescription{
920+
Name: "og-24772",
921+
Namespace: oc.Namespace(),
922+
Template: ogTemplate,
923+
ServiceAccountName: "scoped-24772",
924+
}
925+
926+
g.By("Create OperatorGroup")
927+
og.Create(oc, g.CurrentSpecReport().FullText(), dr)
928+
929+
g.By("Check OperatorGroup Status")
930+
olmv0util.NewCheck("expect", exutil.AsAdmin, exutil.WithoutNamespace, exutil.Compare, "ServiceAccountNotFound", exutil.Ok, []string{"og", og.Name, "-n", og.Namespace, "-o=jsonpath={.status.conditions..reason}"}).Check(oc)
931+
})
932+
933+
g.It("PolarionID:24886-[OTP]OLM should support for user defined ServiceAccount permission changes", func() {
934+
buildDir := exutil.FixturePath("testdata", "olm")
935+
ogTemplate := filepath.Join(buildDir, "operatorgroup-serviceaccount.yaml")
936+
sa := "scoped-24886"
937+
938+
og := olmv0util.OperatorGroupDescription{
939+
Name: "og-24886",
940+
Namespace: oc.Namespace(),
941+
Template: ogTemplate,
942+
ServiceAccountName: sa,
943+
}
944+
945+
g.By("Create OperatorGroup")
946+
og.Create(oc, g.CurrentSpecReport().FullText(), dr)
947+
948+
g.By("Verify ServiceAccountNotFound")
949+
olmv0util.NewCheck("expect", exutil.AsAdmin, exutil.WithoutNamespace, exutil.Compare, "ServiceAccountNotFound", exutil.Ok, []string{"og", og.Name, "-n", og.Namespace, "-o=jsonpath={.status.conditions..reason}"}).Check(oc)
950+
951+
g.By("Create ServiceAccount")
952+
_, err := oc.WithoutNamespace().AsAdmin().Run("create").Args("sa", sa, "-n", og.Namespace).Output()
953+
o.Expect(err).NotTo(o.HaveOccurred())
954+
955+
g.By("Verify status clears")
956+
err = wait.PollUntilContextTimeout(context.TODO(), 10*time.Second, 360*time.Second, false, func(ctx context.Context) (bool, error) {
957+
output, err := oc.AsAdmin().WithoutNamespace().Run("get").Args("og", og.Name, "-n", og.Namespace, "-o=jsonpath={.status.conditions..reason}").Output()
958+
if err != nil {
959+
e2e.Logf("Fail to get og: %s, error: %s and try again", og.Name, err)
960+
return false, nil
961+
}
962+
return strings.TrimSpace(output) == "", nil
963+
})
964+
exutil.AssertWaitPollNoErr(err, "The error ServiceAccountNotFound still be reported in status")
965+
})
966+
879967
})

0 commit comments

Comments
 (0)