Skip to content

Commit

Permalink
fix end version
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Jul 28, 2023
1 parent 2f6a846 commit 477a814
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions integration_tests/cosmoscli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1598,12 +1598,17 @@ def update_permissions(self, address, permissions, **kwargs):
def rollback(self):
self.raw("rollback", home=self.data_dir)

def changeset_dump(self, changeset_dir, **kwargs):
def changeset_dump(self, changeset_dir, end=1, **kwargs):
default_kwargs = {
"home": self.data_dir,
}
return self.raw(
"changeset", "dump", changeset_dir, **(default_kwargs | kwargs)
"changeset",
"dump",
changeset_dir,
"--end-version",
end,
**(default_kwargs | kwargs),
).decode()

def changeset_verify(self, changeset_dir, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/test_versiondb.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_versiondb_migration(cronos: Cronos):

changeset_dir = tempfile.mkdtemp(dir=cronos.base_dir)
print("dump to:", changeset_dir)
print(cli1.changeset_dump(changeset_dir))
print(cli1.changeset_dump(changeset_dir, block1-1))

Check failure on line 48 in integration_tests/test_versiondb.py

View workflow job for this annotation

GitHub Actions / Lint python

./integration_tests/test_versiondb.py:48:52: BLK100 Black would make changes.
snapshot_dir = tempfile.mkdtemp(dir=cronos.base_dir)
print("verify and save to snapshot:", snapshot_dir)
_, commit_info = cli0.changeset_verify(changeset_dir, save_snapshot=snapshot_dir)
Expand Down

0 comments on commit 477a814

Please sign in to comment.