Skip to content

Commit

Permalink
Problem: upgrade test don't reveal some upgrade issues (#678)
Browse files Browse the repository at this point in the history
* Problem: upgrade test don't reveal some upgrade issues

Solution:
- do some basic operations after upgraded.

* fix upgrade handler
  • Loading branch information
yihuang authored Aug 29, 2022
1 parent 777330a commit fe9f9d7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
2 changes: 0 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ import (
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
icacontrollertypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types"
ibcfee "github.com/cosmos/ibc-go/v5/modules/apps/29-fee"
ibcfeekeeper "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/keeper"
ibcfeetypes "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"
Expand Down Expand Up @@ -326,7 +325,6 @@ func New(
feegrant.StoreKey, authzkeeper.StoreKey,
// ibc keys
ibchost.StoreKey, ibctransfertypes.StoreKey,
icacontrollertypes.StoreKey,
ibcfeetypes.StoreKey,
// ethermint keys
evmtypes.StoreKey, feemarkettypes.StoreKey,
Expand Down
22 changes: 21 additions & 1 deletion integration_tests/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@
from pystarport.cluster import SUPERVISOR_CONFIG_FILE

from .network import Cronos, setup_custom_cronos
from .utils import parse_events, wait_for_block, wait_for_block_time, wait_for_port
from .utils import (
ADDRS,
parse_events,
send_transaction,
wait_for_block,
wait_for_block_time,
wait_for_port,
)


def init_cosmovisor(home):
Expand Down Expand Up @@ -126,3 +133,16 @@ def test_cosmovisor_upgrade(custom_cronos: Cronos):

# test migrate keystore
cli.migrate_keystore()

# check basic tx works
wait_for_port(ports.evmrpc_port(custom_cronos.base_port(0)))
receipt = send_transaction(
custom_cronos.w3,
{
"to": ADDRS["community"],
"value": 1000,
"maxFeePerGas": 1000000000000,
"maxPriorityFeePerGas": 10000,
},
)
assert receipt.status == 1

0 comments on commit fe9f9d7

Please sign in to comment.