diff --git a/pkg/testing/testing.go b/pkg/testing/testing.go index 9b0ecb57e3..94cd6afe6e 100644 --- a/pkg/testing/testing.go +++ b/pkg/testing/testing.go @@ -243,6 +243,8 @@ func FromTempDirectory(t *testing.T) string { // By default unit tests presum no config exists unless provided in testdata. t.Setenv("XDG_CONFIG_HOME", t.TempDir()) + t.Setenv("HOME", t.TempDir()) + t.Setenv("KUBERNETES_SERVICE_HOST", "") // creates and CDs to a temp directory