diff --git a/pkg/crc/machine/bundle/metadata_test.go b/pkg/crc/machine/bundle/metadata_test.go index cff984a982..a3212f40e8 100644 --- a/pkg/crc/machine/bundle/metadata_test.go +++ b/pkg/crc/machine/bundle/metadata_test.go @@ -3,6 +3,7 @@ package bundle import ( "encoding/json" "fmt" + "net/url" "path/filepath" "strings" "testing" @@ -209,5 +210,7 @@ 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) + fileURI, err := url.Parse(fmt.Sprintf("file:///%s", absPath)) + require.NoError(t, err) + return fileURI.String() }