diff --git a/test/extended/operators/olm.go b/test/extended/operators/olm.go index c1f96481abd..f25b25bd056 100644 --- a/test/extended/operators/olm.go +++ b/test/extended/operators/olm.go @@ -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() { + 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, "") { + 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() { @@ -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) - } - }) + } + }) })