Skip to content

Commit 0f64f31

Browse files
committed
addressed TestGetStoragev1class unit test failure comments
1 parent 36602fd commit 0f64f31

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pkg/minikube/storageclass/storageclass_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,8 @@ func TestGetStoragev1(t *testing.T) {
252252
}
253253

254254
func setK8SConfig(t *testing.T, config, kubeconfigPath string) error {
255-
if err := os.MkdirAll(filepath.Dir(kubeconfigPath), 0o755); err != nil {
256-
return fmt.Errorf("failed to create kubeconfig directory: %w", err)
257-
}
258255
if err := os.WriteFile(kubeconfigPath, []byte(config), 0o644); err != nil {
259-
return fmt.Errorf("unexpected error when writing to %v: %w", kubeconfigPath, err)
256+
t.Fatalf("unexpected error when writing to %v: %v", kubeconfigPath, err)
260257
}
261258
t.Setenv("KUBECONFIG", kubeconfigPath)
262259
return nil

0 commit comments

Comments
 (0)