Skip to content

Commit

Permalink
Clean up the test: remove a few unused mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
cll-gg committed Nov 8, 2024
1 parent cb348aa commit f55cc8e
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions core/cmd/shell_local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,38 +83,12 @@ func TestShell_RunNodeWithPasswords(t *testing.T) {
})
db := pgtest.NewSqlxDB(t)
keyStore := cltest.NewKeyStore(t, db)
authProviderORM := localauth.NewORM(db, time.Minute, logger.TestLogger(t), audit.NoopLogger)

lggr := logger.TestLogger(t)

opts := legacyevm.ChainRelayOpts{
Logger: lggr,
KeyStore: keyStore.Eth(),
ChainOpts: legacyevm.ChainOpts{
AppConfig: cfg,
MailMon: &mailbox.Monitor{},
DS: db,
},
}
testRelayers := genTestEVMRelayers(t, opts, keyStore)

// Purge the fixture users to test assumption of single admin
// initialUser user created above
pgtest.MustExec(t, db, "DELETE FROM users;")

app := mocks.NewApplication(t)
app.On("AuthenticationProvider").Return(authProviderORM).Maybe()
app.On("BasicAdminUsersORM").Return(authProviderORM).Maybe()
app.On("GetKeyStore").Return(keyStore).Maybe()
app.On("GetRelayers").Return(testRelayers).Maybe()
app.On("Start", mock.Anything).Maybe().Return(nil)
app.On("Stop").Maybe().Return(nil)
app.On("ID").Maybe().Return(uuid.New())

ethClient := evmtest.NewEthClientMock(t)
ethClient.On("Dial", mock.Anything).Return(nil).Maybe()
ethClient.On("BalanceAt", mock.Anything, mock.Anything, mock.Anything).Return(big.NewInt(10), nil).Maybe()

cltest.MustInsertRandomKey(t, keyStore.Eth())
apiPrompt := cltest.NewMockAPIInitializer(t)

Expand Down

0 comments on commit f55cc8e

Please sign in to comment.