From 3d3226c04043a60ad9f88eec56985252c596087a Mon Sep 17 00:00:00 2001 From: Kirtana Ashok Date: Tue, 21 May 2024 14:15:33 -0700 Subject: [PATCH] fix TestGetFSTypeOfInvalidPath Signed-off-by: Kirtana Ashok --- pkg/fs/fs_windows_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/fs/fs_windows_test.go b/pkg/fs/fs_windows_test.go index 512b2352..f8c771d0 100644 --- a/pkg/fs/fs_windows_test.go +++ b/pkg/fs/fs_windows_test.go @@ -17,7 +17,9 @@ func TestGetFSTypeOfKnownDrive(t *testing.T) { } func TestGetFSTypeOfInvalidPath(t *testing.T) { - _, err := GetFileSystemType("7:\\") + // [filepath.VolumeName] doesn't mandate that the drive letters matches [a-zA-Z]. + // Instead, use non-character drive. + _, err := GetFileSystemType(`No:\`) if err != ErrInvalidPath { t.Fatalf("Expected `ErrInvalidPath`, got %v", err) }