-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plain output from command line instead of jsonpath
- Loading branch information
Showing
1 changed file
with
5 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,19 +76,14 @@ var _ = g.Describe("[Feature:Platform] OLM should", func() { | |
// OCP-21082 - Implement packages API server and list packagemanifest info with namespace not NULL | ||
// author: [email protected] | ||
g.It("Implement packages API server and list packagemanifest info with namespace not NULL", func() { | ||
msg, err := oc.AsAdmin().WithoutNamespace().Run("get").Args("packagemanifest", "--all-namespaces", "-o=jsonpath={range .items[*]}{.metadata.name};{.status.catalogSourceNamespace}{\"\\n\"}").Output() | ||
if err != nil { | ||
e2e.Failf("Unable to get %s, error:%v", msg, err) | ||
} | ||
msg, err := oc.AsAdmin().WithoutNamespace().Run("get").Args("packagemanifest", "--all-namespaces", "--no-headers").Output() | ||
o.Expect(err).NotTo(o.HaveOccurred()) | ||
for _, packageManifest := range strings.Split(msg, "\n") { | ||
packageManifestItems := strings.Split(packageManifest, ";") | ||
for _, item := range packageManifestItems { | ||
if item == "" { | ||
e2e.Failf("It should display a namespace for CSV: %s [ref:bz1670311]", packageManifestItems[0]) | ||
} | ||
fields := strings.Fields(packageManifest) | ||
if string(fields[0]) == " " && len(fields) < 4 { | ||
e2e.Failf("It should display a namespace for CSV: %s [ref:bz1670311]", packageManifest) | ||
} | ||
} | ||
o.Expect(err).NotTo(o.HaveOccurred()) | ||
}) | ||
|
||
}) |