Skip to content

Commit

Permalink
qa: adapt the migration functional test to also support 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
darosior committed Jul 20, 2023
1 parent 289f658 commit 097d5e7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,16 @@ def test_migration(lianad_multisig, bitcoind):
# Set the old binary and re-create the datadir.
lianad.cmd_line[0] = OLD_LIANAD_PATH
lianad.restart_fresh(bitcoind)
assert lianad.rpc.getinfo()["version"] == "0.3.0"
old_lianad_ver = lianad.rpc.getinfo()["version"]
assert old_lianad_ver in ["0.3.0", "1.0.0"]

# Perform some transactions. On Liana v0.3 there was no "updated_at" for Spend
# transaction drafts.
receive_and_send(lianad, bitcoind)
spend_txs = lianad.rpc.listspendtxs()["spend_txs"]
assert len(spend_txs) == 2 and all("updated_at" not in s for s in spend_txs)
assert len(spend_txs) == 2
if old_lianad_ver == "0.3.0":
assert all("updated_at" not in s for s in spend_txs)

# Set back the new binary. We should be able to read and, if necessary, upgrade
# the old database and generally all files from the datadir.
Expand Down

0 comments on commit 097d5e7

Please sign in to comment.