From bea17c3ca1e7ac1a4a589827a476e128f6561eb8 Mon Sep 17 00:00:00 2001 From: Kirtana Ashok Date: Tue, 21 May 2024 12:19:44 -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) }