Skip to content

Commit 8ed61af

Browse files
committed
🐛 Ensure KUBECONFIG is unset when testing GetConfiggWithContext
1 parent 6016987 commit 8ed61af

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/client/config/config_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ var _ = Describe("Config", func() {
8181

8282
Context("when kubeconfig files don't exist", func() {
8383
It("should fail", func() {
84+
err := os.Unsetenv(clientcmd.RecommendedConfigPathEnvVar)
85+
Expect(err).NotTo(HaveOccurred())
86+
8487
cfg, err := GetConfigWithContext("")
8588
Expect(cfg).To(BeNil())
8689
Expect(err).To(HaveOccurred())

0 commit comments

Comments
 (0)