Skip to content

Commit

Permalink
wip: test windows file uri fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anjannath committed Oct 3, 2023
1 parent 0c8ea19 commit 4531c9e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/crc/machine/bundle/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"path/filepath"
"runtime"
"strings"
"testing"
"unicode"
Expand Down Expand Up @@ -209,5 +210,8 @@ 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)
if runtime.GOOS == "windows" {
return fmt.Sprintf("file://%s", absPath)
}
return fmt.Sprintf("file:///%s", absPath)
}

0 comments on commit 4531c9e

Please sign in to comment.