Skip to content

Commit

Permalink
update k6build v0.5.0 (#27)
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Chacin <[email protected]>
  • Loading branch information
pablochacin authored Dec 13, 2024
1 parent cd42765 commit dc36558
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ module github.com/grafana/k6provider
go 1.22.4

require (
github.com/grafana/k6build v0.4.0
github.com/grafana/k6build v0.5.0
github.com/grafana/k6deps v0.1.8
)

require (
github.com/Masterminds/semver/v3 v3.3.1 // indirect
github.com/evanw/esbuild v0.24.0 // indirect
github.com/grafana/k6catalog v0.2.3 // indirect
github.com/grafana/k6catalog v0.2.4 // indirect
github.com/grafana/k6foundry v0.3.0 // indirect
github.com/grafana/k6pack v0.2.3 // indirect
golang.org/x/mod v0.21.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ github.com/evanw/esbuild v0.24.0 h1:GZ78naTLp7FKr+K7eNuM/SLs5maeiHYRPsTg6kmdsSE=
github.com/evanw/esbuild v0.24.0/go.mod h1:D2vIQZqV/vIf/VRHtViaUtViZmG7o+kKmlBfVQuRi48=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/grafana/k6build v0.4.0 h1:HSWmacenUqeyWd+4syxFJzqPwC6Ke1mf7JJMwr7rzOM=
github.com/grafana/k6build v0.4.0/go.mod h1:9e3IPYKatismMUV3Oq0V7auStNxoiVuiuk2uZrmRqhg=
github.com/grafana/k6catalog v0.2.3 h1:Gol46qra9yjPYSrxLj6CDKcdY/DUEprM4Xd4TCNPkfA=
github.com/grafana/k6catalog v0.2.3/go.mod h1:ozCf9+KBw63lNrRiZtp7CvzA7V0ATQuOQN2IoG2irw4=
github.com/grafana/k6build v0.5.0 h1:eeq+vcvRbA/DeoRYLhKLXbgESITBh0uyTXYhAjlQ9Bc=
github.com/grafana/k6build v0.5.0/go.mod h1:ATaInvRPNPmM+M6CAgprPBFCIZkn6c2GA8s2KPurbEM=
github.com/grafana/k6catalog v0.2.4 h1:P5wdlqz2APGZhe6qinwQCZXe+z/Rm65VQ7zP/djb4Ng=
github.com/grafana/k6catalog v0.2.4/go.mod h1:nYzfIw6c3o1CEN1YlbUAkqtzIK2hoNWYF0lfYOk+RPg=
github.com/grafana/k6deps v0.1.8 h1:8ZrkAQR8aWQlYPoRlEqbWVHghhGpSHtOQ42fBL++cmo=
github.com/grafana/k6deps v0.1.8/go.mod h1:8szhtnOzNmxwOzJ2diu+wPc9J2Vxvq69Lcyh2WvdVA8=
github.com/grafana/k6foundry v0.3.0 h1:C+6dPbsOv7Uq4hEhBFNuYqmTdE9jQ0VqhXqBDtMkVTE=
Expand Down
28 changes: 21 additions & 7 deletions provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ import (
"path/filepath"
"testing"

"github.com/grafana/k6build/pkg/local"
"github.com/grafana/k6build/pkg/builder"
"github.com/grafana/k6build/pkg/server"
"github.com/grafana/k6build/pkg/store/client"
filestore "github.com/grafana/k6build/pkg/store/file"
storesrv "github.com/grafana/k6build/pkg/store/server"
"github.com/grafana/k6catalog"
"github.com/grafana/k6deps"
)

Expand Down Expand Up @@ -42,11 +44,6 @@ func Test_Provider(t *testing.T) { //nolint:paralleltest

// 2. start an object store server
storeSrv := httptest.NewServer(storesrv.NewStoreServer(storeConfig))
buildConfig := local.BuildServiceConfig{
Catalog: "testdata/catalog.json",
CopyGoEnv: true,
StoreURL: storeSrv.URL,
}

// 3. start a download proxy
storeURL, _ := url.Parse(storeSrv.URL)
Expand All @@ -55,7 +52,24 @@ func Test_Provider(t *testing.T) { //nolint:paralleltest
defer proxy.Close()

// 4. configure a local builder
builder, err := local.NewBuildService(context.TODO(), buildConfig)
storeClient, err := client.NewStoreClient(client.StoreClientConfig{Server: storeSrv.URL})
if err != nil {
t.Fatalf("store client setup %v", err)
}
catalog, err := k6catalog.NewCatalog(context.TODO(), "testdata/catalog.json")
if err != nil {
t.Fatalf("build server setup %v", err)
}
buildConfig := builder.Config{
Opts: builder.Opts{
GoOpts: builder.GoOpts{
CopyGoEnv: true,
},
},
Catalog: catalog,
Store: storeClient,
}
builder, err := builder.New(context.TODO(), buildConfig)
if err != nil {
t.Fatalf("setup %v", err)
}
Expand Down

0 comments on commit dc36558

Please sign in to comment.