From fd6daac399bb1c665a2be83fa8432ef1cce1a0b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Wed, 24 Jul 2024 10:42:53 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Oleg Bespalov --- cmd/cloud.go | 6 +++--- cmd/cloud_login.go | 1 + cmd/cloud_run.go | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/cloud.go b/cmd/cloud.go index 640b0a7e9ed..5d913d8d745 100644 --- a/cmd/cloud.go +++ b/cmd/cloud.go @@ -120,7 +120,7 @@ func (c *cmdCloud) run(cmd *cobra.Command, args []string) error { } if !cloudConfig.Token.Valid { return errors.New( //nolint:golint - "not logged in, please login to the Grafana Cloud k6 " + + "not logged in, please login first to the Grafana Cloud k6 " + "using the \"k6 cloud login\" command", ) } @@ -366,9 +366,9 @@ func getCmdCloud(gs *state.GlobalState) *cobra.Command { cloudCmd := &cobra.Command{ Use: "cloud", Short: "Run a test on the cloud", - Long: `Run a test archive in the Grafana Cloud k6. + Long: `Run a test in the Grafana Cloud k6. -This will execute the test in the Grafana Cloud k6 service. Be sure to run the "k6 cloud login" command prior to +This will archive test script(s), including all necessary resources, and execute the test in the Grafana Cloud k6 service. Be sure to run the "k6 cloud login" command prior to authenticate with Grafana Cloud k6.`, Args: exactCloudArgs(), Deprecated: `the k6 team is in the process of modifying and deprecating the "k6 cloud" command behavior. diff --git a/cmd/cloud_login.go b/cmd/cloud_login.go index cbba559426f..0224839935a 100644 --- a/cmd/cloud_login.go +++ b/cmd/cloud_login.go @@ -110,6 +110,7 @@ func (c *cmdCloudLogin) run(cmd *cobra.Command, _ []string) error { newCloudConf.Token = token default: form := ui.Form{ + Banner: "Please enter your Grafana Cloud k6 credentials", Fields: []ui.Field{ ui.StringField{ Key: "Email", diff --git a/cmd/cloud_run.go b/cmd/cloud_run.go index 82bfab570a9..c23f3b7fbf8 100644 --- a/cmd/cloud_run.go +++ b/cmd/cloud_run.go @@ -30,7 +30,7 @@ func getCmdCloudRun(gs *state.GlobalState) *cobra.Command { Short: "Run a test in Grafana Cloud k6", Long: `Run a test in Grafana Cloud k6. -This will execute the test in the Grafana Cloud k6 service. Using this command requires to be authenticated +This will archive test script(s), including all necessary resources, and execute the test in the Grafana Cloud k6 service. Using this command requires to be authenticated against Grafana Cloud k6. Use the "k6 cloud login" command to authenticate.`, Example: exampleText, Args: exactArgsWithMsg(1,