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
Apply suggestions from code review
Co-authored-by: Oleg Bespalov <[email protected]>
  • Loading branch information
oleiade and olegbespalov authored Jul 24, 2024
commit fd6daac399bb1c665a2be83fa8432ef1cce1a0b6
6 changes: 3 additions & 3 deletions cmd/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
}
Expand Down Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions cmd/cloud_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion cmd/cloud_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading