Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Oct 27, 2023
1 parent bcefb10 commit 6b80a9d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions integration_tests/test_client_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@ def test_config_client_id(cronos):
cli = cronos.cosmos_cli(0)
dir = cli.data_dir / "config"

def edit_gensis_cfg(chain_id):
def edit_genesis_cfg(chain_id):
genesis_cfg = dir / "genesis.json"
genesis = json.loads(genesis_cfg.read_text())
genesis["chain_id"] = chain_id
genesis_cfg.write_text(json.dumps(genesis))

# start with empty chain_id from genesis should fail
edit_gensis_cfg("")
edit_genesis_cfg("")
with pytest.raises(Exception):
cronos.supervisorctl("start", n0)

edit_gensis_cfg("cronos_777-1")
chain_id = 777
edit_genesis_cfg(f"cronos_{chain_id}-1")
cronos.supervisorctl("start", n0)
wait_for_port(ports.evmrpc_port(p0))
assert w3.eth.chain_id == 777
assert w3.eth.chain_id == chain_id

0 comments on commit 6b80a9d

Please sign in to comment.