Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
pkskpro committed Jan 23, 2025
2 parents 65d59a2 + 7129195 commit 2f09cd8
Show file tree
Hide file tree
Showing 610 changed files with 1,211 additions and 879 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
open-pull-requests-limit: 50
groups:
golangx:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tc39.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ jobs:
- name: Run tests
run: |
set -x
cd js/tc39
cd internal/js/tc39
sh checkout.sh
go test -timeout 1h
4 changes: 2 additions & 2 deletions .github/workflows/wpt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
- name: Run Streams Tests
run: |
set -x
cd js/modules/k6/experimental/streams/tests
cd internal/js/modules/k6/experimental/streams/tests
sh checkout.sh
go test ../... -tags=wpt
- name: Run Webcrypto Tests
run: |
set -x
cd js/modules/k6/webcrypto/tests
cd internal/js/modules/k6/webcrypto/tests
sh checkout.sh
go test ./... -tags=wpt
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/k6.exe
/dist
/pkg-build
/js/tc39/TestTC39
/js/modules/k6/experimental/streams/tests/wpt
/internal/js/tc39/TestTC39
/internal/js/modules/k6/experimental/streams/tests/wpt

.vscode
*.sublime-workspace
Expand Down Expand Up @@ -36,4 +36,4 @@ script.js
/packaging/*.gpg

# web platform tests
js/modules/k6/webcrypto/tests/wpt/
/internal/js/modules/k6/webcrypto/tests/wpt/
4 changes: 2 additions & 2 deletions api/v1/control_surface.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package v1
import (
"context"

"go.k6.io/k6/execution"
"go.k6.io/k6/internal/execution"
"go.k6.io/k6/internal/metrics/engine"
"go.k6.io/k6/lib"
"go.k6.io/k6/metrics"
"go.k6.io/k6/metrics/engine"
)

// ControlSurface includes the methods the REST API can use to control and
Expand Down
12 changes: 6 additions & 6 deletions api/v1/group_routes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"go.k6.io/k6/execution"
"go.k6.io/k6/execution/local"
"go.k6.io/k6/internal/execution"
"go.k6.io/k6/internal/execution/local"
"go.k6.io/k6/internal/lib/testutils"
"go.k6.io/k6/internal/lib/testutils/minirunner"
"go.k6.io/k6/internal/metrics/engine"
"go.k6.io/k6/internal/usage"
"go.k6.io/k6/lib"
"go.k6.io/k6/lib/testutils"
"go.k6.io/k6/lib/testutils/minirunner"
"go.k6.io/k6/metrics"
"go.k6.io/k6/metrics/engine"
"go.k6.io/k6/usage"
)

func getTestPreInitState(tb testing.TB) *lib.TestPreInitState {
Expand Down
2 changes: 1 addition & 1 deletion api/v1/metric_routes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/stretchr/testify/require"
"gopkg.in/guregu/null.v3"

"go.k6.io/k6/internal/lib/testutils/minirunner"
"go.k6.io/k6/lib"
"go.k6.io/k6/lib/testutils/minirunner"
"go.k6.io/k6/metrics"
)

Expand Down
10 changes: 5 additions & 5 deletions api/v1/setup_teardown_routes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ import (
"github.com/stretchr/testify/require"
"gopkg.in/guregu/null.v3"

"go.k6.io/k6/execution"
"go.k6.io/k6/execution/local"
"go.k6.io/k6/js"
"go.k6.io/k6/internal/execution"
"go.k6.io/k6/internal/execution/local"
"go.k6.io/k6/internal/js"
"go.k6.io/k6/internal/loader"
"go.k6.io/k6/internal/metrics/engine"
"go.k6.io/k6/lib"
"go.k6.io/k6/lib/types"
"go.k6.io/k6/loader"
"go.k6.io/k6/metrics"
"go.k6.io/k6/metrics/engine"
"go.k6.io/k6/output"
)

Expand Down
2 changes: 1 addition & 1 deletion api/v1/status_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"go.k6.io/k6/errext"
"go.k6.io/k6/errext/exitcodes"
"go.k6.io/k6/execution"
"go.k6.io/k6/internal/execution"
"go.k6.io/k6/lib/executor"
)

Expand Down
8 changes: 4 additions & 4 deletions api/v1/status_routes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import (
"github.com/stretchr/testify/require"
"gopkg.in/guregu/null.v3"

"go.k6.io/k6/execution"
"go.k6.io/k6/execution/local"
"go.k6.io/k6/internal/execution"
"go.k6.io/k6/internal/execution/local"
"go.k6.io/k6/internal/lib/testutils/minirunner"
"go.k6.io/k6/internal/metrics/engine"
"go.k6.io/k6/lib"
"go.k6.io/k6/lib/testutils/minirunner"
"go.k6.io/k6/metrics"
"go.k6.io/k6/metrics/engine"
"go.k6.io/k6/output"
)

Expand Down
2 changes: 1 addition & 1 deletion cloudapi/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"go.k6.io/k6/lib/testutils"
"go.k6.io/k6/internal/lib/testutils"
"go.k6.io/k6/lib/types"
)

Expand Down
4 changes: 2 additions & 2 deletions cloudapi/logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"github.com/stretchr/testify/require"
"gopkg.in/guregu/null.v3"

"go.k6.io/k6/lib/testutils"
"go.k6.io/k6/lib/testutils/httpmultibin"
"go.k6.io/k6/internal/lib/testutils"
"go.k6.io/k6/internal/lib/testutils/httpmultibin"
)

func TestMsgParsing(t *testing.T) {
Expand Down
10 changes: 10 additions & 0 deletions cmd/execute.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Package cmd is here to provide a way for xk6 to build a binary with added extensions
package cmd

import "go.k6.io/k6/internal/cmd"

// Execute exectues the k6 command
// It only is exported here for backwards compatibility and the ability to use xk6 to build extended k6
func Execute() {
cmd.Execute()
}
167 changes: 0 additions & 167 deletions cmd/new.go

This file was deleted.

4 changes: 2 additions & 2 deletions cmd/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"github.com/mattn/go-isatty"
"github.com/sirupsen/logrus"

"go.k6.io/k6/event"
"go.k6.io/k6/internal/event"
"go.k6.io/k6/internal/ui/console"
"go.k6.io/k6/lib/fsext"
"go.k6.io/k6/ui/console"
)

const defaultConfigFileName = "config.json"
Expand Down
17 changes: 17 additions & 0 deletions cmd/tests/global_state.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Package tests contains types needed for running integration tests that run k6 commands.
package tests

import (
"testing"

"go.k6.io/k6/internal/cmd/tests"
)

// GlobalTestState is a wrapper around GlobalState for use in tests.
type GlobalTestState = tests.GlobalTestState

// NewGlobalTestState returns an initialized GlobalTestState, mocking all
// GlobalState fields for use in tests.
func NewGlobalTestState(tb testing.TB) *GlobalTestState {
return tests.NewGlobalTestState(tb)
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ require (
golang.org/x/term v0.28.0
golang.org/x/time v0.9.0
google.golang.org/grpc v1.69.4
google.golang.org/protobuf v1.36.2
google.golang.org/protobuf v1.36.3
gopkg.in/guregu/null.v3 v3.3.0
gopkg.in/yaml.v3 v3.0.1
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A=
google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.36.2 h1:R8FeyR1/eLmkutZOM5CWghmo5itiG9z0ktFlTVLuTmU=
google.golang.org/protobuf v1.36.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU=
google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y=
gopkg.in/cenkalti/backoff.v1 v1.1.0/go.mod h1:J6Vskwqd+OMVJl8C33mmtxTBs2gyzfv7UDAkHu8BrjI=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
Loading

0 comments on commit 2f09cd8

Please sign in to comment.