Skip to content

Commit

Permalink
WIP add tests assert k6 cloud run command's arguments handling
Browse files Browse the repository at this point in the history
  • Loading branch information
oleiade committed Jun 26, 2024
1 parent c021149 commit b7efb31
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions cmd/tests/cmd_cloud_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,3 +288,16 @@ func TestCloudWithArchive(t *testing.T) {
assert.Contains(t, stdout, `output: https://app.k6.io/runs/123`)
assert.Contains(t, stdout, `test status: Finished`)
}

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`)
}

0 comments on commit b7efb31

Please sign in to comment.