From 20230f22514e399dd3d2bb883232101d1522751c Mon Sep 17 00:00:00 2001 From: Mark Rossetti Date: Thu, 6 Mar 2025 13:05:48 -0800 Subject: [PATCH] Fixing unit tests in k8s.io/kubernetes/pkg/volume/util/subpath on Windows --- pkg/volume/util/subpath/subpath_windows_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/volume/util/subpath/subpath_windows_test.go b/pkg/volume/util/subpath/subpath_windows_test.go index 0896ef67ee7..682fcd4f59d 100644 --- a/pkg/volume/util/subpath/subpath_windows_test.go +++ b/pkg/volume/util/subpath/subpath_windows_test.go @@ -40,7 +40,7 @@ func makeLink(link, target string) error { func TestDoSafeMakeDir(t *testing.T) { base, err := ioutil.TempDir("", "TestDoSafeMakeDir") if err != nil { - t.Fatalf(err.Error()) + t.Fatalf("failed to create temporary directory: %v", err) } defer os.RemoveAll(base) @@ -136,7 +136,7 @@ func TestDoSafeMakeDir(t *testing.T) { func TestLockAndCheckSubPath(t *testing.T) { base, err := ioutil.TempDir("", "TestLockAndCheckSubPath") if err != nil { - t.Fatalf(err.Error()) + t.Fatalf("failed to create temporary directory: %v", err) } defer os.RemoveAll(base) @@ -240,7 +240,7 @@ func TestLockAndCheckSubPath(t *testing.T) { func TestLockAndCheckSubPathWithoutSymlink(t *testing.T) { base, err := ioutil.TempDir("", "TestLockAndCheckSubPathWithoutSymlink") if err != nil { - t.Fatalf(err.Error()) + t.Fatalf("failed to create temporary directory: %v", err) } defer os.RemoveAll(base) @@ -344,7 +344,7 @@ func TestLockAndCheckSubPathWithoutSymlink(t *testing.T) { func TestFindExistingPrefix(t *testing.T) { base, err := ioutil.TempDir("", "TestFindExistingPrefix") if err != nil { - t.Fatalf(err.Error()) + t.Fatalf("failed to create temporary directory: %v", err) } defer os.RemoveAll(base)