@@ -58,7 +58,8 @@ func (s *JobRunnerSuite) TestSimpleJobStartFinish() {
5858 var resultTargets []* target.Target
5959
6060 require .NoError (s .T (), s .RegisterStateFullStep (
61- func (ctx xcontext.Context , ch test.TestStepChannels , params test.TestStepParameters , ev testevent.Emitter , resumeState json.RawMessage ) (json.RawMessage , error ) {
61+ func (ctx xcontext.Context , ch test.TestStepChannels , ev testevent.Emitter ,
62+ stepsVars test.StepsVariables , params test.TestStepParameters , resumeState json.RawMessage ) (json.RawMessage , error ) {
6263 return teststeps .ForEachTarget (stateFullStepName , ctx , ch , func (ctx xcontext.Context , target * target.Target ) error {
6364 assert .NotNil (s .T (), target )
6465 mu .Lock ()
@@ -91,7 +92,7 @@ func (s *JobRunnerSuite) TestSimpleJobStartFinish() {
9192 TargetManager : targetlist .New (),
9293 },
9394 TestStepsBundles : []test.TestStepBundle {
94- s .NewStep (ctx , "test_step_label" , stateFullStepName , nil ),
95+ s .NewStep (ctx , "test_step_label" , stateFullStepName , nil , nil ),
9596 },
9697 },
9798 },
@@ -124,7 +125,8 @@ func (s *JobRunnerSuite) TestJobWithTestRetry() {
124125 var callsCount int
125126
126127 require .NoError (s .T (), s .RegisterStateFullStep (
127- func (ctx xcontext.Context , ch test.TestStepChannels , params test.TestStepParameters , ev testevent.Emitter , resumeState json.RawMessage ) (json.RawMessage , error ) {
128+ func (ctx xcontext.Context , ch test.TestStepChannels , ev testevent.Emitter ,
129+ stepsVars test.StepsVariables , params test.TestStepParameters , resumeState json.RawMessage ) (json.RawMessage , error ) {
128130 return teststeps .ForEachTarget (stateFullStepName , ctx , ch , func (ctx xcontext.Context , target * target.Target ) error {
129131 assert .NotNil (s .T (), target )
130132 mu .Lock ()
@@ -175,11 +177,11 @@ func (s *JobRunnerSuite) TestJobWithTestRetry() {
175177 TestStepsBundles : []test.TestStepBundle {
176178 s .NewStep (ctx , "echo1_step_label" , echo .Name , map [string ][]test.Param {
177179 "text" : {* test .NewParam ("hello" )},
178- }),
179- s .NewStep (ctx , "test_step_label" , stateFullStepName , nil ),
180+ }, nil ),
181+ s .NewStep (ctx , "test_step_label" , stateFullStepName , nil , nil ),
180182 s .NewStep (ctx , "echo2_step_label" , echo .Name , map [string ][]test.Param {
181183 "text" : {* test .NewParam ("world" )},
182- }),
184+ }, nil ),
183185 },
184186 },
185187 },
@@ -280,7 +282,7 @@ func (s *JobRunnerSuite) TestJobRetryOnFailedAcquire() {
280282 TestStepsBundles : []test.TestStepBundle {
281283 s .NewStep (ctx , "echo1_step_label" , echo .Name , map [string ][]test.Param {
282284 "text" : {* test .NewParam ("hello" )},
283- }),
285+ }, nil ),
284286 },
285287 },
286288 },
@@ -359,7 +361,7 @@ func (s *JobRunnerSuite) TestAcquireFailed() {
359361 TestStepsBundles : []test.TestStepBundle {
360362 s .NewStep (ctx , "echo1_step_label" , echo .Name , map [string ][]test.Param {
361363 "text" : {* test .NewParam ("hello" )},
362- }),
364+ }, nil ),
363365 },
364366 },
365367 },
@@ -429,7 +431,7 @@ func (s *JobRunnerSuite) TestResumeStateBadJobId() {
429431 TestStepsBundles : []test.TestStepBundle {
430432 s .NewStep (ctx , "echo1_step_label" , echo .Name , map [string ][]test.Param {
431433 "text" : {* test .NewParam ("hello" )},
432- }),
434+ }, nil ),
433435 },
434436 },
435437 },
@@ -454,22 +456,27 @@ func (s *JobRunnerSuite) TestResumeStateBadJobId() {
454456const stateFullStepName = "statefull"
455457
456458type stateFullStep struct {
457- runFunction func (ctx xcontext.Context , ch test.TestStepChannels , params test. TestStepParameters ,
458- ev testevent. Emitter , resumeState json.RawMessage ) (json.RawMessage , error )
459+ runFunction func (ctx xcontext.Context , ch test.TestStepChannels , ev testevent. Emitter ,
460+ stepsVars test. StepsVariables , params test. TestStepParameters , resumeState json.RawMessage ) (json.RawMessage , error )
459461 validateFunction func (ctx xcontext.Context , params test.TestStepParameters ) error
460462}
461463
462464func (sfs * stateFullStep ) Name () string {
463465 return stateFullStepName
464466}
465467
466- func (sfs * stateFullStep ) Run (ctx xcontext.Context , ch test.TestStepChannels , params test.TestStepParameters ,
467- ev testevent.Emitter , resumeState json.RawMessage ,
468+ func (sfs * stateFullStep ) Run (
469+ ctx xcontext.Context ,
470+ ch test.TestStepChannels ,
471+ ev testevent.Emitter ,
472+ stepsVars test.StepsVariables ,
473+ params test.TestStepParameters ,
474+ resumeState json.RawMessage ,
468475) (json.RawMessage , error ) {
469476 if sfs .runFunction == nil {
470477 return nil , fmt .Errorf ("stateFullStep run is not initialised" )
471478 }
472- return sfs .runFunction (ctx , ch , params , ev , resumeState )
479+ return sfs .runFunction (ctx , ch , ev , stepsVars , params , resumeState )
473480}
474481
475482func (sfs * stateFullStep ) ValidateParameters (ctx xcontext.Context , params test.TestStepParameters ) error {
0 commit comments