Skip to content

Commit e22c359

Browse files
test: wallet: Check direct file backup name.
This check ensures that when migrating a legacy wallet with a direct filename, the backup file is named as expected. Co-authored-by: Ava Chow <[email protected]>
1 parent 9f713b8 commit e22c359

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/functional/wallet_migration.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,10 @@ def test_direct_file(self):
584584
)
585585
assert (self.master_node.wallets_path / "plainfile").is_file()
586586

587-
self.master_node.migratewallet("plainfile")
587+
mocked_time = int(time.time())
588+
self.master_node.setmocktime(mocked_time)
589+
migrate_res = self.master_node.migratewallet("plainfile")
590+
assert_equal(f"plainfile_{mocked_time}.legacy.bak", os.path.basename(migrate_res["backup_path"]))
588591
wallet = self.master_node.get_wallet_rpc("plainfile")
589592
info = wallet.getwalletinfo()
590593
assert_equal(info["descriptors"], True)

0 commit comments

Comments
 (0)