Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions test/extended/operators/olm.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,32 @@ var _ = g.Describe("[Feature:Platform] an end user use OLM", func() {
o.Expect(err).NotTo(o.HaveOccurred())
o.Expect(msg).To(o.ContainSubstring("Upgradeable True"))
}

})

// OCP-24818 - Checking OLM descriptors
// author: tbuskey@redhat.com
g.It("Checking OLM descriptors", func() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this being done for all CRDs shipped with OpenShift?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jianzhangbjz Do you have direction here?

Copy link
Copy Markdown

@awgreene awgreene Feb 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test seems extremely similar to those featured in openshift/origin#22696 as well. Could you explain how the tests featured in openshift/origin are different from those featured in the openshift/openshift-test repository?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were directed to move QE OLM tests out of the origin repo to this one.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay - that's good to know - thanks!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we're migrating the extended tests from origin to this repo. Details in: openshift/enhancements#183

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)
}
})

// OCP-27589 do not use ipv4 addresses in CatalogSources generated by marketplace
// author: tbuskey@redhat.com
g.It("do not use ipv4 addresses in CatalogSources generated by marketplace", func() {
Expand Down Expand Up @@ -257,6 +280,6 @@ var _ = g.Describe("[Feature:Platform] an end user use OLM", func() {
}
if olmErrs > 0 {
e2e.Failf("%v ipv4 addresses found in these OLM components: %v", olmErrs, olmNames)
}
})
}
})
})