Skip to content

Commit

Permalink
Move integration tests from cmd to cmd/tests
Browse files Browse the repository at this point in the history
See #2459
  • Loading branch information
Ivan Mirić committed Jan 16, 2023
1 parent f20b3ca commit 5341f3b
Show file tree
Hide file tree
Showing 4 changed files with 215 additions and 121 deletions.
7 changes: 7 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ func Execute() {
newRootCommand(gs).execute()
}

// ExecuteWithGlobalState runs the root command with an existing GlobalState.
// This is needed by integration tests, and we don't want to modify the
// Execute() signature to avoid breaking k6 extensions.
func ExecuteWithGlobalState(gs *state.GlobalState) {
newRootCommand(gs).execute()
}

func (c *rootCommand) waitRemoteLogger() {
if c.loggerIsRemote {
select {
Expand Down
Loading

0 comments on commit 5341f3b

Please sign in to comment.