Skip to content

Commit

Permalink
Fixing err in test
Browse files Browse the repository at this point in the history
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
  • Loading branch information
mohammedzee1000 committed May 31, 2021
1 parent ed7a0fe commit 457ece0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/integration/devfile/cmd_devfile_catalog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@ var _ = Describe("odo devfile catalog command tests", func() {
helper.MatchAllInOutput(output, wantOutput)
})
It("should list components successfully even with an invalid kubeconfig path or path points to existing directory", func() {
projectKC := os.Getenv("KUBECONFIG")
err := os.Setenv("KUBECONFIG", "/idonotexist")
Expect(err).ToNot(HaveOccurred())
helper.CmdShouldPass("odo", "catalog", "list", "components")
err = os.Setenv("KUBECONFIG", commonVar.Context)
Expect(err).ToNot(HaveOccurred())
helper.CmdShouldPass("odo", "catalog", "list", "components")
err = os.Setenv("KUBECONFIG", projectKC)
})
})

Expand Down

0 comments on commit 457ece0

Please sign in to comment.