@@ -253,10 +253,13 @@ func (suite *BackfillTxErrorMessagesSuite) TestValidateInvalidFormat() {
253253
254254 // invalid execution-node-ids param
255255 suite .Run ("invalid execution-node-ids field" , func () {
256+ executorIDsList , err := commands .ConvertToInterfaceList ([]int {1 , 2 , 3 })
257+ suite .Require ().NoError (err )
258+
256259 // invalid type
257- err : = suite .command .Validator (& admin.CommandRequest {
260+ err = suite .command .Validator (& admin.CommandRequest {
258261 Data : map [string ]interface {}{
259- "execution-node-ids" : [] int { 1 , 2 , 3 } ,
262+ "execution-node-ids" : executorIDsList ,
260263 },
261264 })
262265 suite .Error (err )
@@ -275,11 +278,15 @@ func (suite *BackfillTxErrorMessagesSuite) TestValidateInvalidFormat() {
275278
276279 // invalid execution node id
277280 invalidENID := unittest .IdentifierFixture ()
281+
282+ executorIDsList , err = commands .ConvertToInterfaceList ([]string {invalidENID .String ()})
283+ suite .Require ().NoError (err )
284+
278285 err = suite .command .Validator (& admin.CommandRequest {
279286 Data : map [string ]interface {}{
280287 "start-height" : float64 (1 ), // raw json parses to float64
281288 "end-height" : float64 (4 ), // raw json parses to float64
282- "execution-node-ids" : [] string { invalidENID . String ()} ,
289+ "execution-node-ids" : executorIDsList ,
283290 },
284291 })
285292 suite .Error (err )
@@ -306,11 +313,13 @@ func (suite *BackfillTxErrorMessagesSuite) TestValidateValidFormat() {
306313
307314 // all parameters are provided
308315 suite .Run ("happy case, all parameters are provided" , func () {
309- err := suite .command .Validator (& admin.CommandRequest {
316+ executorIDsList , err := commands .ConvertToInterfaceList ([]string {suite .allENIDs [0 ].ID ().String ()})
317+ suite .Require ().NoError (err )
318+ err = suite .command .Validator (& admin.CommandRequest {
310319 Data : map [string ]interface {}{
311320 "start-height" : float64 (1 ), // raw json parses to float64
312321 "end-height" : float64 (3 ), // raw json parses to float64
313- "execution-node-ids" : [] string { suite . allENIDs [ 0 ]. ID (). String ()} ,
322+ "execution-node-ids" : executorIDsList ,
314323 },
315324 })
316325 suite .NoError (err )
@@ -374,11 +383,14 @@ func (suite *BackfillTxErrorMessagesSuite) TestHandleBackfillTxErrorMessages() {
374383 suite .allENIDs = unittest .IdentityListFixture (3 , unittest .WithRole (flow .RoleExecution ))
375384
376385 executorID := suite .allENIDs [1 ].ID ()
386+ executorIDsList , err := commands .ConvertToInterfaceList ([]string {executorID .String ()})
387+ suite .Require ().NoError (err )
388+
377389 req = & admin.CommandRequest {
378390 Data : map [string ]interface {}{
379391 "start-height" : float64 (startHeight ), // raw json parses to float64
380392 "end-height" : float64 (endHeight ), // raw json parses to float64
381- "execution-node-ids" : [] string { executorID . String ()} ,
393+ "execution-node-ids" : executorIDsList ,
382394 },
383395 }
384396 suite .Require ().NoError (suite .command .Validator (req ))
@@ -401,7 +413,7 @@ func (suite *BackfillTxErrorMessagesSuite) TestHandleBackfillTxErrorMessages() {
401413 suite .mockStoreTxErrorMessages (blockId , results , executorID )
402414 }
403415
404- _ , err : = suite .command .Handler (ctx , req )
416+ _ , err = suite .command .Handler (ctx , req )
405417 suite .Require ().NoError (err )
406418 suite .assertAllExpectations ()
407419 })
0 commit comments