Skip to content

Commit

Permalink
Revert "fix URL in Windows systems"
Browse files Browse the repository at this point in the history
This reverts commit 465b0dc.
  • Loading branch information
pablochacin committed Jul 12, 2024
1 parent 465b0dc commit 1fa741d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 2 additions & 11 deletions cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,10 @@ func (f *FileCache) Store(_ context.Context, id string, content io.Reader) (Obje
return Object{}, fmt.Errorf("%w: %w", ErrCreatingObject, err)
}

fileURL := url.URL{
Scheme: "file",
Path: objectFile.Name(),
}
return Object{
ID: id,
Checksum: checksum,
URL: fileURL.String(),
URL: fmt.Sprintf("file://%s", objectFile.Name()),
}, nil
}

Expand All @@ -131,15 +127,10 @@ func (f *FileCache) Get(_ context.Context, id string) (Object, error) {
return Object{}, fmt.Errorf("%w: %w", ErrAccessingObject, err)
}

fileURL := url.URL{
Scheme: "file",
Path: filepath.Join(objectDir, "data"),
}

return Object{
ID: id,
Checksum: string(checksum),
URL: fileURL.String(),
URL: fmt.Sprintf("file://%s", filepath.Join(objectDir, "data")),
}, nil
}

Expand Down
2 changes: 1 addition & 1 deletion testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func SetupTestLocalBuildService(config LocalBuildServiceConfig) (BuildService, e
{
path: "go.k6.io/k6ext",
version: "v0.2.0",
source: filepath.Join("testdata", "deps", "k6ext"),
source: filepath.Join("testdata", "deps" , "k6ext"),
},
{
path: "go.k6.io/k6ext2",
Expand Down

0 comments on commit 1fa741d

Please sign in to comment.