Skip to content

Commit

Permalink
fix filepaths for windows tests
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Chacin <[email protected]>
  • Loading branch information
pablochacin committed Jul 12, 2024
1 parent 28ccc8d commit a00b6e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion apiserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/json"
"net/http"
"net/http/httptest"
"path/filepath"
"testing"

"github.com/google/go-cmp/cmp"
Expand Down Expand Up @@ -42,7 +43,7 @@ func TestAPIServer(t *testing.T) {
buildsrv, err := SetupTestLocalBuildService(
LocalBuildServiceConfig{
CacheDir: t.TempDir(),
Catalog: "testdata/catalog.json",
Catalog: filepath.Join("testdata", "catalog.json"),
},
)
if err != nil {
Expand Down
11 changes: 6 additions & 5 deletions testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"context"
"fmt"
"net/http/httptest"
"path/filepath"

"github.com/grafana/k6catalog"
"github.com/grafana/k6foundry"
Expand All @@ -21,27 +22,27 @@ func SetupTestLocalBuildService(config LocalBuildServiceConfig) (BuildService, e
{
path: "go.k6.io/k6",
version: "v0.1.0",
source: "testdata/deps/k6",
source: filepath.Join("testdata", "deps", "k6"),
},
{
path: "go.k6.io/k6",
version: "v0.2.0",
source: "testdata/deps/k6",
source: filepath.Join("testdata", "deps", "k6"),
},
{
path: "go.k6.io/k6ext",
version: "v0.1.0",
source: "testdata/deps/k6ext",
source: filepath.Join("testdata", "deps", "k6ext"),
},
{
path: "go.k6.io/k6ext",
version: "v0.2.0",
source: "testdata/deps/k6ext",
source: filepath.Join("testdata", "deps" , "k6ext"),
},
{
path: "go.k6.io/k6ext2",
version: "v0.1.0",
source: "testdata/deps/k6ext2",
source: filepath.Join("testdata", "deps", "k6ext2"),
},
}

Expand Down

0 comments on commit a00b6e3

Please sign in to comment.