From f35edf299eb4f05e8d059c8901ba6287083bbf84 Mon Sep 17 00:00:00 2001 From: Andrew Slotin Date: Thu, 15 Feb 2024 18:08:49 +0100 Subject: [PATCH] Update k6 cloud tests to use options.cloud --- cmd/tests/cmd_cloud_test.go | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/cmd/tests/cmd_cloud_test.go b/cmd/tests/cmd_cloud_test.go index 26f2438e179..9fb63678ac7 100644 --- a/cmd/tests/cmd_cloud_test.go +++ b/cmd/tests/cmd_cloud_test.go @@ -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)