Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

[issue-#1018] EVM Module keeper - Improve code coverage #1396

Merged
merged 13 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (cli) [#1360](https://github.com/evmos/ethermint/pull/1360) Introduce a new `grpc-only` flag, such that when enabled, will start the node in a query-only mode. Note, gRPC MUST be enabled with this flag.
* (rpc) [#1378](https://github.com/evmos/ethermint/pull/1378) Add support for EVM RPC metrics
* (ante) [#1390](https://github.com/evmos/ethermint/pull/1390) Added multisig tx support.
* (test) [#1396](https://github.com/evmos/ethermint/pull/1396) Increase test coverage for the EVM module `keeper`

### Bug Fixes

Expand Down
24 changes: 24 additions & 0 deletions x/evm/keeper/abci_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package keeper_test

import (
"github.com/tendermint/tendermint/abci/types"
evmtypes "github.com/evmos/ethermint/x/evm/types"
)


func (suite *KeeperTestSuite) TestEndBlock() {

suite.Run("EndBlock test", func() {
suite.SetupTest() // reset
GAtom22 marked this conversation as resolved.
Show resolved Hide resolved

em := suite.ctx.EventManager()
suite.Require().Equal(0, len(em.Events()))

res := suite.app.EvmKeeper.EndBlock(suite.ctx, types.RequestEndBlock{})
suite.Require().Equal([]types.ValidatorUpdate{}, res)

// should emit 1 EventTypeBlockBloom event on EndBlock
suite.Require().Equal(1, len(em.Events()))
suite.Require().Equal(evmtypes.EventTypeBlockBloom, em.Events()[0].Type)
})
}
Loading