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

Commit

Permalink
ime(evm): improve code coverage for EVM keeper (#1396)
Browse files Browse the repository at this point in the history
* [issue-1018] add new tests on evm module keeper

* [issue-1018] add more new tests on evm module keeper

* [issue-1018] add more new tests on evm module keeper (state_transition, statedb, utils)

* [issue-1018] add more new tests on evm module keeper (msg_server)

* [issue-1018] fix code style

* [issue-1018] add changes in CHANGELOG

* [issue-1018] add missing error check in grpc_query_test

* [issue-1018] fix failing tests

* [issue-1018] add changes based on review comments (grpc_query_test & abci_test)

* [issue-1018] add GenerateAddress in TestEthCall (grpc_query_test)

* [issue-1018] remove unnecessary SetupTest calls

* [issue-1018] refactor SetupTest calls (grpc_query_test & statedb_test)
  • Loading branch information
GAtom22 authored Oct 21, 2022
1 parent f4fae00 commit f04b289
Show file tree
Hide file tree
Showing 10 changed files with 1,110 additions and 107 deletions.
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
18 changes: 18 additions & 0 deletions x/evm/keeper/abci_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package keeper_test

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

func (suite *KeeperTestSuite) TestEndBlock() {
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

0 comments on commit f04b289

Please sign in to comment.