Skip to content
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

Commenting project list -o json CI flake #3620

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
21 changes: 11 additions & 10 deletions tests/integration/project/cmd_project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,17 @@ var _ = Describe("odo project command tests", func() {
})
})

Context("odo machine readable output on empty project", func() {
It("should be able to list current project", func() {
projectListJSON := helper.CmdShouldPass("odo", "project", "list", "-o", "json")
listOutputJSON, err := helper.Unindented(projectListJSON)
Expect(err).Should(BeNil())
partOfProjectListJSON, err := helper.Unindented(`{"kind":"Project","apiVersion":"odo.dev/v1alpha1","metadata":{"name":"` + project + `","namespace":"` + project + `","creationTimestamp":null},"spec":{},"status":{"active":true}}`)
Expect(err).Should(BeNil())
Expect(listOutputJSON).To(ContainSubstring(partOfProjectListJSON))
})
})
// Uncomment via https://github.com/openshift/odo/issues/2117 fix
// Context("odo machine readable output on empty project", func() {
// It("should be able to list current project", func() {
// projectListJSON := helper.CmdShouldPass("odo", "project", "list", "-o", "json")
// listOutputJSON, err := helper.Unindented(projectListJSON)
// Expect(err).Should(BeNil())
// partOfProjectListJSON, err := helper.Unindented(`{"kind":"Project","apiVersion":"odo.dev/v1alpha1","metadata":{"name":"` + project + `","namespace":"` + project + `","creationTimestamp":null},"spec":{},"status":{"active":true}}`)
// Expect(err).Should(BeNil())
// Expect(listOutputJSON).To(ContainSubstring(partOfProjectListJSON))
// })
// })

Context("Should be able to delete a project with --wait", func() {
var projectName string
Expand Down