diff --git a/pkg/crc/machine/bundle/metadata_test.go b/pkg/crc/machine/bundle/metadata_test.go index cff984a982..821cf8e4b3 100644 --- a/pkg/crc/machine/bundle/metadata_test.go +++ b/pkg/crc/machine/bundle/metadata_test.go @@ -209,5 +209,9 @@ func TestVerifiedHash(t *testing.T) { func testDataURI(t *testing.T, sha256sum string) string { absPath, err := filepath.Abs(filepath.Join("testdata", sha256sum)) require.NoError(t, err) - return fmt.Sprintf("file:///%s", absPath) + // when its a windows path with drive letter + if volume := filepath.VolumeName(absPath); volume != "" { + return fmt.Sprintf("file://%s/%s", volume[:1], absPath[3:]) + } + return fmt.Sprintf("file:///%s", filepath.ToSlash(absPath)) }