Skip to content

Commit 8d8953d

Browse files
authored
Merge pull request #909 from mcristina422/unsetKubeconfig
🐛 Ensure KUBECONFIG is unset when testing GetConfigWithContext
2 parents 29d89a8 + 8ed61af commit 8d8953d

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)