Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move cloud run and login functionalities under cloud subcommands #3813

Merged
merged 11 commits into from
Jul 24, 2024
Prev Previous commit
Next Next commit
FIXME add tests assert k6 cloud run command's arguments handling
  • Loading branch information
oleiade committed Jul 23, 2024
commit 40632285357adb78abdfc9d837f6e13523ceb93a
14 changes: 14 additions & 0 deletions cmd/tests/cmd_cloud_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,3 +288,17 @@ func TestCloudWithArchive(t *testing.T) {
assert.Contains(t, stdout, `output: https://app.k6.io/runs/123`)
assert.Contains(t, stdout, `test status: Finished`)
}

// FIXME: This test fails because our test setup leaves stdout empty
//func TestCloudArgs(t *testing.T) {
// t.Parallel()
//
// // ts := NewGlobalTestState(t)
// ts := getSimpleCloudTestState(t, nil, nil, nil, nil)
// ts.CmdArgs = []string{"k6", "cloud", "run"}
// ts.ExpectedExitCode = -1
// cmd.ExecuteWithGlobalState(ts.GlobalState)
//
// stdout := ts.Stdout.String()
// assert.Contains(t, stdout, `accepts 1 or 2 arg(s), received 0`)
//}