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

Drop options.ext.loadimpact references #3602

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions cmd/tests/cmd_cloud_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,21 +246,19 @@ func TestCloudWithArchive(t *testing.T) {

metadata := struct {
Options struct {
Ext struct {
LoadImpact struct {
Name string `json:"name"`
Note string `json:"note"`
ProjectID int `json:"projectID"`
} `json:"loadimpact"`
} `json:"ext"`
Cloud struct {
Name string `json:"name"`
Note string `json:"note"`
ProjectID int `json:"projectID"`
} `json:"cloud"`
} `json:"options"`
}{}

// then unpacked metadata should not contain any environment variables passed at the moment of archive creation
require.NoError(t, json.Unmarshal(metadataRaw, &metadata))
require.Equal(t, "my load test", metadata.Options.Ext.LoadImpact.Name)
require.Equal(t, "lorem ipsum", metadata.Options.Ext.LoadImpact.Note)
require.Equal(t, 124, metadata.Options.Ext.LoadImpact.ProjectID)
require.Equal(t, "my load test", metadata.Options.Cloud.Name)
require.Equal(t, "lorem ipsum", metadata.Options.Cloud.Note)
require.Equal(t, 124, metadata.Options.Cloud.ProjectID)

// respond with the test run ID
resp.WriteHeader(http.StatusOK)
Expand Down
2 changes: 1 addition & 1 deletion output/cloud/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func newOutput(params output.Params) (*Output, error) {
scriptPath := params.ScriptPath.String()
if scriptPath == "" {
// Script from stdin without a name, likely from stdin
return nil, errors.New("script name not set, please specify K6_CLOUD_NAME or options.ext.loadimpact.name")
return nil, errors.New("script name not set, please specify K6_CLOUD_NAME or options.cloud.name")
}

conf.Name = null.StringFrom(filepath.Base(scriptPath))
Expand Down