Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Feb 24, 2025
1 parent 17414b3 commit b030ce8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions integration_tests/cosmoscli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1804,6 +1804,11 @@ def restore_versiondb(self, height, format=3, **kwargs):
**kwargs,
)

def changeset_fixdata(self, versiondb_dir, dry_run=False):
return self.raw(
"changeset", "fixdata", versiondb_dir, "--dry-run" if dry_run else None
)

def dump_snapshot(self, height, tarball, format=3):
return self.raw(
"snapshots", "dump", height, format, home=self.data_dir, output=tarball
Expand Down
8 changes: 8 additions & 0 deletions integration_tests/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import shutil
import stat
import subprocess
import time
from contextlib import contextmanager
from datetime import datetime, timedelta
from pathlib import Path
Expand Down Expand Up @@ -274,6 +275,13 @@ def do_upgrade(
do_upgrade("v1.3", target4, gas_prices=gas_prices)
cli = c.cosmos_cli()

c.supervisorctl("stop", "cronos_777-1-node0")
time.sleep(3)
cli.changeset_fixdata(f"{c.base_dir}/node0/data/versiondb")
assert not cli.changeset_fixdata(f"{c.base_dir}/node0/data/versiondb", dry_run=True)
c.supervisorctl("start", "cronos_777-1-node0")
wait_for_port(ports.evmrpc_port(c.base_port(0)))

# check basic tx works
wait_for_port(ports.evmrpc_port(c.base_port(0)))
receipt = send_transaction(
Expand Down

0 comments on commit b030ce8

Please sign in to comment.