diff --git a/cmd/cloud.go b/cmd/cloud.go index a0387c15eaf..a7479e8dc41 100644 --- a/cmd/cloud.go +++ b/cmd/cloud.go @@ -335,7 +335,7 @@ func (c *cmdCloud) flagSet() *pflag.FlagSet { flags.BoolVar(&c.uploadOnly, "upload-only", c.uploadOnly, "only upload the test to the cloud without actually starting a test run") if err := flags.MarkDeprecated("upload-only", "use \"k6 cloud upload\" instead"); err != nil { - panic(err) + panic(err) // Should never happen } return flags diff --git a/cmd/cloud_upload.go b/cmd/cloud_upload.go index c5e125899a2..81c8a2a970f 100644 --- a/cmd/cloud_upload.go +++ b/cmd/cloud_upload.go @@ -26,16 +26,17 @@ func getCmdCloudUpload(cloudCmd *cmdCloud) *cobra.Command { // uploadCloudCommand represents the 'cloud upload' command exampleText := getExampleText(cloudCmd.gs, ` - # Upload the test to the Grafana Cloud k6 without actually starting a test run + # Upload the test script and its resources to the Grafana Cloud k6 without actually starting a test run $ {{.}} cloud upload script.js`[1:]) uploadCloudCommand := &cobra.Command{ Use: cloudUploadCommandName, - Short: "Upload the test to the Grafana Cloud k6", - Long: `Upload the test to the Grafana Cloud k6. + Short: "Upload the test script to the Grafana Cloud k6", + Long: `Upload the test script and its resources to the Grafana Cloud k6. -This will upload the test to the Grafana Cloud k6 service. Using this command requires to be authenticated -against the Grafana Cloud k6. Use the "k6 cloud login" command to authenticate. +This will upload the test script and its resources to the Grafana Cloud k6 service. +Using this command requires to be authenticated against the Grafana Cloud k6. +Use the "k6 cloud login" command to authenticate. `, Example: exampleText, Args: exactArgsWithMsg(1, "arg should either be \"-\", if reading script from stdin, or a path to a script file"), diff --git a/cmd/tests/cmd_cloud_upload_test.go b/cmd/tests/cmd_cloud_upload_test.go index 93bec9c1334..29c748867b5 100644 --- a/cmd/tests/cmd_cloud_upload_test.go +++ b/cmd/tests/cmd_cloud_upload_test.go @@ -26,7 +26,7 @@ func TestK6CloudUpload(t *testing.T) { ts := getSimpleCloudTestState(t, nil, setupK6CloudUploadCmd, nil, nil, nil) delete(ts.Env, "K6_CLOUD_TOKEN") - ts.ExpectedExitCode = -1 // TODO: use a more specific exit code? + ts.ExpectedExitCode = -1 cmd.ExecuteWithGlobalState(ts.GlobalState) stdout := ts.Stdout.String()