-
Notifications
You must be signed in to change notification settings - Fork 78
UPSTREAM: <carry>: migrate bandrade test cases #1193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2769,5 +2769,17 @@ | |
| "environmentSelector": { | ||
| "exclude": "topology==\"External\"" | ||
| } | ||
| }, | ||
| { | ||
| "name": "[sig-operator][Jira:OLM] OLMv0 webhook operator PolarionID:83979-[Skipped:Disconnected]ClusterExtension installs webhook-operator and webhooks work", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bandrade the update is not full. you should miss some cases. please update them. |
||
| "labels": { | ||
| "Extended": {} | ||
| }, | ||
| "resources": { | ||
| "isolation": {} | ||
| }, | ||
| "source": "openshift:payload:olmv0", | ||
| "lifecycle": "blocking", | ||
| "environmentSelector": {} | ||
| } | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,6 +49,28 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 should", func() { | |
| dr.RmIr(itName) | ||
| }) | ||
|
|
||
| g.It("PolarionID:OCP-24818-Checking OLM descriptors", func() { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bandrade caseID format is not correct. |
||
| olmErr := 0 | ||
| olmErrDescriptor := []string{""} | ||
| olmExplains := []string{"InstallPlan", "ClusterServiceVersion", "Subscription", "CatalogSource", "OperatorSource", "OperatorGroup", "PackageManifest"} | ||
| for _, olmExplain := range olmExplains { | ||
| msg, err := oc.AsAdmin().WithoutNamespace().Run("explain").Args(olmExplain).Output() | ||
| if err != nil { | ||
| olmErr++ | ||
| olmErrDescriptor = append(olmErrDescriptor, olmExplain) | ||
| } | ||
| o.Expect(err).NotTo(o.HaveOccurred()) | ||
| if strings.Contains(msg, "<empty>") { | ||
| olmErr++ | ||
| olmErrDescriptor = append(olmErrDescriptor, olmExplain) | ||
| } | ||
| } | ||
| if olmErr != 0 { | ||
| // fmt.Printf("explain errors: %d\n", olmErr) | ||
| e2e.Failf("%v errors in explaining the following OLM descriptors: %v", olmErr, olmErrDescriptor) | ||
| } | ||
| }) | ||
|
|
||
| g.It("PolarionID:22259-[OTP][Skipped:Disconnected]marketplace operator CR status on a running cluster[Serial]", g.Label("NonHyperShiftHOST"), g.Label("original-name:[sig-operator][Jira:OLM] OLMv0 should PolarionID:22259-[Skipped:Disconnected]marketplace operator CR status on a running cluster[Serial]"), func() { | ||
|
|
||
| exutil.SkipForSNOCluster(oc) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3119,6 +3119,214 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 optional should", func() { | |
| o.Expect(msg).To(o.ContainSubstring("learn-operator.v0.0.3")) | ||
| }) | ||
|
|
||
| // Polarion ID: 43073 | ||
| g.It("PolarionID:43073-[OTP]Indicate dependency class in resolution constraint text", g.Label("original-name:[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:43073-[Skipped:Disconnected]Indicate dependency class in resolution constraint text"), func() { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bandrade no need g.Label because it is first added. same comment for other new added cases.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 43073 is a new case in this repo, no need to add original-name
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bandrade it was ConnectedOnly, so need to add [Skipped:Disconnected] |
||
| olmv0util.ValidateAccessEnvironment(oc) | ||
| architecture.SkipNonAmd64SingleArch(oc) | ||
|
|
||
| dr := make(olmv0util.DescriberResrouce) | ||
| itName := g.CurrentSpecReport().FullText() | ||
| dr.AddIr(itName) | ||
| buildPruningBaseDir := exutil.FixturePath("testdata", "olm") | ||
| csImageTemplate := filepath.Join(buildPruningBaseDir, "catalogsource-image.yaml") | ||
| subTemplate := filepath.Join(buildPruningBaseDir, "olm-subscription.yaml") | ||
| ogSingleTemplate := filepath.Join(buildPruningBaseDir, "operatorgroup.yaml") | ||
|
|
||
| catsrc := olmv0util.CatalogSourceDescription{ | ||
| Name: "cs-43073", | ||
| Namespace: "openshift-marketplace", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bandrade better to create it in oc.Namespace. |
||
| DisplayName: "OLM QE Operators", | ||
| Publisher: "bandrade", | ||
| SourceType: "grpc", | ||
| Address: "quay.io/olmqe/bundle-with-dep-error-index:4.0", | ||
| Template: csImageTemplate, | ||
| } | ||
| defer catsrc.Delete(itName, dr) | ||
| catsrc.CreateWithCheck(oc, itName, dr) | ||
|
|
||
| og := olmv0util.OperatorGroupDescription{ | ||
| Name: "og-43073", | ||
| Namespace: oc.Namespace(), | ||
| Template: ogSingleTemplate, | ||
| } | ||
| og.CreateWithCheck(oc, itName, dr) | ||
|
|
||
| sub := olmv0util.SubscriptionDescription{ | ||
| SubName: "lib-bucket-provisioner-43073", | ||
| Namespace: oc.Namespace(), | ||
| CatalogSourceName: catsrc.Name, | ||
| CatalogSourceNamespace: catsrc.Namespace, | ||
| Channel: "alpha", | ||
| IpApproval: "Automatic", | ||
| OperatorPackage: "lib-bucket-provisioner", | ||
| SingleNamespace: true, | ||
| Template: subTemplate, | ||
| } | ||
| defer sub.Delete(itName, dr) | ||
| defer sub.DeleteCSV(itName, dr) | ||
| sub.CreateWithoutCheck(oc, itName, dr) | ||
|
|
||
| olmv0util.NewCheck("expect", exutil.AsAdmin, exutil.WithoutNamespace, exutil.Compare, "ConstraintsNotSatisfiable", exutil.Ok, []string{"subs", sub.SubName, "-n", oc.Namespace(), "-o=jsonpath={.status.conditions[?(@.type==\"ResolutionFailed\")].reason}"}).Check(oc) | ||
| }) | ||
|
|
||
| // Polarion ID: 47149 | ||
| g.It("PolarionID:47149-[OTP]Conjunctive constraint of one package and one GVK", g.Label("original-name:[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:47149-[Skipped:Disconnected]Conjunctive constraint of one package and one GVK"), func() { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need to add original-name
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bandrade it was ConnectedOnly, so need to add [Skipped:Disconnected] |
||
| olmv0util.ValidateAccessEnvironment(oc) | ||
| architecture.SkipNonAmd64SingleArch(oc) | ||
| exutil.SkipIfDisableDefaultCatalogsource(oc) | ||
|
|
||
| dr := make(olmv0util.DescriberResrouce) | ||
| itName := g.CurrentSpecReport().FullText() | ||
| dr.AddIr(itName) | ||
|
|
||
| buildPruningBaseDir := exutil.FixturePath("testdata", "olm") | ||
| subTemplate := filepath.Join(buildPruningBaseDir, "olm-subscription.yaml") | ||
| ogTemplate := filepath.Join(buildPruningBaseDir, "operatorgroup.yaml") | ||
| csImageTemplate := filepath.Join(buildPruningBaseDir, "catalogsource-image.yaml") | ||
| cs := olmv0util.CatalogSourceDescription{ | ||
| Name: "ocp-47149", | ||
| Namespace: oc.Namespace(), | ||
| DisplayName: "ocp-47149", | ||
| Publisher: "OLM QE", | ||
| SourceType: "grpc", | ||
| Address: "quay.io/olmqe/etcd-47149:1.0", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bandrade if bundle image or operand iamge is not in quay.io/olmqe, quay.io/openshifttest, quay.io/openshift-qe-optional-operators, registry.redhat.io, brew.registry.redhat.io, registry.stage.redhat.io and registry-proxy.engineering.redhat.com (I am fear etcd image is not in them), please add [Skipped:Disconnected] because qe disc env only support to mirror these registry. |
||
| Template: csImageTemplate, | ||
| } | ||
| cs.CreateWithCheck(oc, itName, dr) | ||
|
|
||
| og := olmv0util.OperatorGroupDescription{ | ||
| Name: "test-og-47149", | ||
| Namespace: oc.Namespace(), | ||
| Template: ogTemplate, | ||
| } | ||
| og.CreateWithCheck(oc, itName, dr) | ||
|
|
||
| sub := olmv0util.SubscriptionDescription{ | ||
| SubName: "etcd", | ||
| Namespace: oc.Namespace(), | ||
| CatalogSourceName: cs.Name, | ||
| CatalogSourceNamespace: cs.Namespace, | ||
| Channel: "singlenamespace-alpha", | ||
| IpApproval: "Automatic", | ||
| OperatorPackage: "etcd", | ||
| SingleNamespace: true, | ||
| Template: subTemplate, | ||
| } | ||
| sub.Create(oc, itName, dr) | ||
|
|
||
| waitErr := wait.PollUntilContextTimeout(context.TODO(), 15*time.Second, 360*time.Second, false, func(ctx context.Context) (bool, error) { | ||
| csvList, err := oc.AsAdmin().WithoutNamespace().Run("get").Args("csv", "-n", sub.Namespace).Output() | ||
| o.Expect(err).NotTo(o.HaveOccurred()) | ||
| lines := strings.Split(csvList, "\n") | ||
| for _, line := range lines { | ||
| if strings.Contains(line, "prometheusoperator") { | ||
| if strings.Contains(line, "Succeeded") { | ||
| return true, nil | ||
| } | ||
| return false, nil | ||
| } | ||
| } | ||
| return false, nil | ||
| }) | ||
| exutil.AssertWaitPollNoErr(waitErr, "csv prometheusoperator is not Succeeded") | ||
| olmv0util.NewCheck("expect", exutil.AsUser, exutil.WithoutNamespace, exutil.Compare, "Succeeded", exutil.Ok, []string{"csv", "etcdoperator.v0.9.4", "-n", sub.Namespace, "-o=jsonpath={.status.phase}"}).Check(oc) | ||
| }) | ||
|
|
||
| // Polarion ID: 47181 | ||
| g.It("PolarionID:47181-[OTP]Disjunctive constraint of one package and one GVK", g.Label("original-name:[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:47181-[Skipped:Disconnected]Disjunctive constraint of one package and one GVK"), func() { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need to add original-name
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bandrade it was ConnectedOnly, so need to add [Skipped:Disconnected] |
||
| olmv0util.ValidateAccessEnvironment(oc) | ||
| architecture.SkipNonAmd64SingleArch(oc) | ||
|
|
||
| dr := make(olmv0util.DescriberResrouce) | ||
| itName := g.CurrentSpecReport().FullText() | ||
| dr.AddIr(itName) | ||
|
|
||
| buildPruningBaseDir := exutil.FixturePath("testdata", "olm") | ||
| subTemplate := filepath.Join(buildPruningBaseDir, "olm-subscription.yaml") | ||
| ogTemplate := filepath.Join(buildPruningBaseDir, "operatorgroup.yaml") | ||
| csImageTemplate := filepath.Join(buildPruningBaseDir, "catalogsource-image.yaml") | ||
| cs := olmv0util.CatalogSourceDescription{ | ||
| Name: "ocp-47181", | ||
| Namespace: oc.Namespace(), | ||
| DisplayName: "ocp-47181", | ||
| Publisher: "OLM QE", | ||
| SourceType: "grpc", | ||
| Address: "quay.io/olmqe/etcd-47181:1.0", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bandrade same above comment. |
||
| Template: csImageTemplate, | ||
| } | ||
| cs.CreateWithCheck(oc, itName, dr) | ||
|
|
||
| og := olmv0util.OperatorGroupDescription{ | ||
| Name: "test-og-47181", | ||
| Namespace: oc.Namespace(), | ||
| Template: ogTemplate, | ||
| } | ||
| og.CreateWithCheck(oc, itName, dr) | ||
|
|
||
| sub := olmv0util.SubscriptionDescription{ | ||
| SubName: "etcd", | ||
| Namespace: oc.Namespace(), | ||
| CatalogSourceName: cs.Name, | ||
| CatalogSourceNamespace: cs.Namespace, | ||
| Channel: "singlenamespace-alpha", | ||
| IpApproval: "Automatic", | ||
| OperatorPackage: "etcd", | ||
| SingleNamespace: true, | ||
| Template: subTemplate, | ||
| } | ||
| sub.Create(oc, itName, dr) | ||
|
|
||
| olmv0util.NewCheck("expect", exutil.AsUser, exutil.WithoutNamespace, exutil.Compare, "Succeeded", exutil.Ok, []string{"csv", sub.InstalledCSV, "-n", sub.Namespace, "-o=jsonpath={.status.phase}"}).Check(oc) | ||
| }) | ||
|
|
||
| // Polarion ID: 47179 | ||
| g.It("PolarionID:47179-[OTP]Disjunctive constraint of one package and one GVK", g.Label("original-name:[sig-operator][Jira:OLM] OLMv0 optional should PolarionID:47179-[Skipped:Disconnected]Disjunctive constraint of one package and one GVK"), func() { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need to add original-name
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bandrade it was ConnectedOnly, so need to add [Skipped:Disconnected] |
||
| olmv0util.ValidateAccessEnvironment(oc) | ||
| architecture.SkipNonAmd64SingleArch(oc) | ||
| exutil.SkipIfDisableDefaultCatalogsource(oc) | ||
|
|
||
| dr := make(olmv0util.DescriberResrouce) | ||
| itName := g.CurrentSpecReport().FullText() | ||
| dr.AddIr(itName) | ||
|
|
||
| buildPruningBaseDir := exutil.FixturePath("testdata", "olm") | ||
| subTemplate := filepath.Join(buildPruningBaseDir, "olm-subscription.yaml") | ||
| ogTemplate := filepath.Join(buildPruningBaseDir, "operatorgroup.yaml") | ||
| csImageTemplate := filepath.Join(buildPruningBaseDir, "catalogsource-image.yaml") | ||
| cs := olmv0util.CatalogSourceDescription{ | ||
| Name: "ocp-47179", | ||
| Namespace: oc.Namespace(), | ||
| DisplayName: "ocp-47179", | ||
| Publisher: "OLM QE", | ||
| SourceType: "grpc", | ||
| Address: "quay.io/olmqe/etcd-47179:1.0", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bandrade same above comment |
||
| Template: csImageTemplate, | ||
| } | ||
| cs.CreateWithCheck(oc, itName, dr) | ||
|
|
||
| og := olmv0util.OperatorGroupDescription{ | ||
| Name: "test-og-47179", | ||
| Namespace: oc.Namespace(), | ||
| Template: ogTemplate, | ||
| } | ||
| og.CreateWithCheck(oc, itName, dr) | ||
|
|
||
| sub := olmv0util.SubscriptionDescription{ | ||
| SubName: "etcd", | ||
| Namespace: oc.Namespace(), | ||
| CatalogSourceName: cs.Name, | ||
| CatalogSourceNamespace: cs.Namespace, | ||
| Channel: "singlenamespace-alpha", | ||
| IpApproval: "Automatic", | ||
| OperatorPackage: "etcd", | ||
| SingleNamespace: true, | ||
| Template: subTemplate, | ||
| } | ||
| sub.Create(oc, itName, dr) | ||
|
|
||
| olmv0util.NewCheck("expect", exutil.AsUser, exutil.WithoutNamespace, exutil.Contain, "red-hat-camel-k-operator", exutil.Ok, []string{"csv", "-n", sub.Namespace}).Check(oc) | ||
| }) | ||
|
|
||
| // Polarion ID: 20981 | ||
| g.It("PolarionID:20981-[OTP]-contain the source commit id", g.Label("NonHyperShiftHOST"), func() { | ||
| if os.Getenv("GITHUB_TOKEN") == "" { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not all cases are added in this json file
please run "make update-metadata"