@@ -88,7 +88,7 @@ export const options = {
8888
8989export default function() {};`
9090
91- ts := makeTestState (t , script , []string {"--local-execution" }, 0 )
91+ ts := makeTestState (t , script , []string {"--local-execution" })
9292
9393 testServerHandlerFunc := http .HandlerFunc (func (resp http.ResponseWriter , req * http.Request ) {
9494 // When using the local execution mode, the test archive should be uploaded to the cloud
@@ -141,7 +141,7 @@ export const options = {
141141
142142export default function() {};`
143143
144- ts := makeTestState (t , script , []string {"--local-execution" , "--no-archive-upload" }, 0 )
144+ ts := makeTestState (t , script , []string {"--local-execution" , "--no-archive-upload" })
145145
146146 testServerHandlerFunc := http .HandlerFunc (func (resp http.ResponseWriter , req * http.Request ) {
147147 body , err := io .ReadAll (req .Body )
@@ -198,7 +198,7 @@ export default function() {
198198 ` + "console.log(`The test run id is ${__ENV.K6_CLOUDRUN_TEST_RUN_ID}`);" + `
199199};`
200200
201- ts := makeTestState (t , script , []string {"--local-execution" , "--log-output=stdout" }, 0 )
201+ ts := makeTestState (t , script , []string {"--local-execution" , "--log-output=stdout" })
202202
203203 const testRunID = 1337
204204 srv := getCloudTestEndChecker (t , testRunID , nil , cloudapi .RunStatusFinished , cloudapi .ResultStatusPassed )
@@ -226,7 +226,7 @@ export const options = {
226226
227227export default function() {};`
228228
229- ts := makeTestState (t , script , []string {"--local-execution" , "--log-output=stdout" }, 0 )
229+ ts := makeTestState (t , script , []string {"--local-execution" , "--log-output=stdout" })
230230 ts .ExpectedExitCode = - 1
231231 delete (ts .Env , "K6_CLOUD_STACK_ID" )
232232
@@ -238,15 +238,14 @@ export default function() {};`
238238 })
239239}
240240
241- func makeTestState (tb testing.TB , script string , cliFlags []string , expExitCode exitcodes. ExitCode ) * GlobalTestState {
241+ func makeTestState (tb testing.TB , script string , cliFlags []string ) * GlobalTestState {
242242 if cliFlags == nil {
243243 cliFlags = []string {"-v" , "--log-output=stdout" }
244244 }
245245
246246 ts := NewGlobalTestState (tb )
247247 require .NoError (tb , fsext .WriteFile (ts .FS , filepath .Join (ts .Cwd , "test.js" ), []byte (script ), 0o644 ))
248248 ts .CmdArgs = append (append ([]string {"k6" , "cloud" , "run" }, cliFlags ... ), "test.js" )
249- ts .ExpectedExitCode = int (expExitCode )
250249 ts .Env ["K6_CLOUD_TOKEN" ] = "foo" // doesn't matter, we mock the cloud
251250 ts .Env ["K6_CLOUD_STACK_ID" ] = "1234" // doesn't matter, we mock the cloud
252251
0 commit comments