From 457ece01e7985957d0b7de639763ae2c1c1a62fd Mon Sep 17 00:00:00 2001 From: Mohammed Zeeshan Ahmed Date: Mon, 31 May 2021 14:25:05 +0530 Subject: [PATCH] Fixing err in test Signed-off-by: Mohammed Zeeshan Ahmed --- tests/integration/devfile/cmd_devfile_catalog_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration/devfile/cmd_devfile_catalog_test.go b/tests/integration/devfile/cmd_devfile_catalog_test.go index df333e5cb7b..c4f59a7d40a 100644 --- a/tests/integration/devfile/cmd_devfile_catalog_test.go +++ b/tests/integration/devfile/cmd_devfile_catalog_test.go @@ -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) }) })