Skip to content

Commit

Permalink
wip: test windows fileuri parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
anjannath committed Oct 3, 2023
1 parent 0c8ea19 commit 7547612
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/crc/machine/bundle/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package bundle
import (
"encoding/json"
"fmt"
"net/url"
"path/filepath"
"strings"
"testing"
Expand Down Expand Up @@ -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()
}

0 comments on commit 7547612

Please sign in to comment.