Skip to content

Commit

Permalink
Record args in mock transactor (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-shim authored and pschork committed Jun 26, 2024
1 parent a92ea7b commit 96b4d5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/mock/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (t *MockTransactor) UpdateOperatorSocket(ctx context.Context, socket string
}

func (t *MockTransactor) BuildEjectOperatorsTxn(ctx context.Context, operatorsByQuorum [][]core.OperatorID) (*types.Transaction, error) {
args := t.Called()
args := t.Called(ctx, operatorsByQuorum)
result := args.Get(0)
return result.(*types.Transaction), args.Error(1)
}
Expand Down
2 changes: 1 addition & 1 deletion disperser/dataapi/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func TestEjectOperatorHandler(t *testing.T) {
addr2 := gethcommon.HexToAddress("0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2")
mockTx.On("BatchOperatorIDToAddress").Return([]gethcommon.Address{addr1, addr2}, nil)
mockTx.On("GetQuorumBitmapForOperatorsAtBlockNumber").Return([]*big.Int{big.NewInt(3), big.NewInt(0)}, nil)
mockTx.On("BuildEjectOperatorsTxn").Return(types.NewTransaction(0, gethcommon.HexToAddress("0x1"), big.NewInt(0), 0, big.NewInt(0), []byte{}), nil)
mockTx.On("BuildEjectOperatorsTxn", mock.Anything, mock.Anything).Return(types.NewTransaction(0, gethcommon.HexToAddress("0x1"), big.NewInt(0), 0, big.NewInt(0), []byte{}), nil)
mockTx.On("EjectOperators").Return(&types.Receipt{
GasUsed: uint64(10),
}, nil)
Expand Down

0 comments on commit 96b4d5b

Please sign in to comment.