Skip to content

Commit

Permalink
Fix mock calls
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Oct 13, 2021
1 parent ab46bb7 commit 8af2ae4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/cmd/local_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func TestClient_RunNodeShowsEnv(t *testing.T) {
ethClient.On("BalanceAt", mock.Anything, mock.Anything, mock.Anything).Return(big.NewInt(10), nil)

app := new(mocks.Application)
app.On("AdvisoryLock").Return(nil)
app.On("AdvisoryLock", mock.Anything, mock.Anything).Return(nil)
app.On("SessionORM").Return(sessionORM)
app.On("GetKeyStore").Return(keyStore)
app.On("GetChainSet").Return(cltest.NewChainSetMockWithOneChain(t, ethClient, evmtest.NewChainScopedConfig(t, cfg))).Maybe()
Expand Down Expand Up @@ -118,6 +118,7 @@ func TestClient_RunNodeWithPasswords(t *testing.T) {
require.NoError(t, err)

app := new(mocks.Application)
app.On("AdvisoryLock", mock.Anything, mock.Anything).Return(nil)
app.On("SessionORM").Return(sessionORM)
app.On("GetKeyStore").Return(keyStore)
app.On("GetChainSet").Return(cltest.NewChainSetMockWithOneChain(t, cltest.NewEthClientMock(t), evmtest.NewChainScopedConfig(t, cfg))).Maybe()
Expand Down Expand Up @@ -164,7 +165,7 @@ func TestClient_RunNode_CreateFundingKeyIfNotExists(t *testing.T) {
require.NoError(t, err)

app := new(mocks.Application)
app.On("AdvisoryLock").Return(nil)
app.On("AdvisoryLock", mock.Anything, mock.Anything).Return(nil)
app.On("SessionORM").Return(sessionORM)
app.On("GetKeyStore").Return(keyStore)
app.On("GetChainSet").Return(cltest.NewChainSetMockWithOneChain(t, cltest.NewEthClientMock(t), evmtest.NewChainScopedConfig(t, cfg))).Maybe()
Expand Down Expand Up @@ -230,7 +231,7 @@ func TestClient_RunNodeWithAPICredentialsFile(t *testing.T) {
ethClient.On("BalanceAt", mock.Anything, mock.Anything, mock.Anything).Return(big.NewInt(10), nil)

app := new(mocks.Application)
app.On("AdvisoryLock").Return(nil)
app.On("AdvisoryLock", mock.Anything, mock.Anything).Return(nil)
app.On("SessionORM").Return(sessionORM)
app.On("GetKeyStore").Return(keyStore)
app.On("GetChainSet").Return(cltest.NewChainSetMockWithOneChain(t, ethClient, evmtest.NewChainScopedConfig(t, cfg))).Maybe()
Expand Down

0 comments on commit 8af2ae4

Please sign in to comment.