Skip to content

Commit

Permalink
Merge 277d276 into b5a6feb
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewslotin authored Feb 15, 2024
2 parents b5a6feb + 277d276 commit 85197d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
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

0 comments on commit 85197d6

Please sign in to comment.