Skip to content

Commit de1f9a7

Browse files
fix test failure if KUBECONFIG environment variable is set
1 parent 11435db commit de1f9a7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/pkg/services/ske/utils/utils_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,8 @@ func TestGetDefaultKubeconfigPath(t *testing.T) {
724724

725725
for _, tt := range tests {
726726
t.Run(tt.description, func(t *testing.T) {
727+
// prevent test from failing if user has set the environment variable
728+
t.Setenv("KUBECONFIG", "")
727729
output, err := GetDefaultKubeconfigPath()
728730

729731
if err != nil {

0 commit comments

Comments
 (0)