Skip to content

Commit 76fe0e5

Browse files
committed
test: Migration of a wallet ending in ../
1 parent f0bb3d5 commit 76fe0e5

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/functional/wallet_migration.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,24 @@ def test_wallet_with_path_ending_in_slash(self):
637637

638638
assert_equal(bals, wallet.getbalances())
639639

640+
def test_wallet_with_path_ending_in_relative_specifier(self):
641+
self.log.info("Test migrating a wallet with a name/path ending in a relative specifier, '..'")
642+
wallet_ending_in_relative = "path/that/ends/in/.."
643+
# the wallet data is actually inside of path/that/ends/
644+
wallet = self.create_legacy_wallet(wallet_ending_in_relative)
645+
default = self.master_node.get_wallet_rpc(self.default_wallet_name)
646+
647+
addr = wallet.getnewaddress()
648+
txid = default.sendtoaddress(addr, 1)
649+
self.generate(self.master_node, 1)
650+
bals = wallet.getbalances()
651+
652+
_, wallet = self.migrate_and_get_rpc(wallet_ending_in_relative)
653+
654+
assert wallet.gettransaction(txid)
655+
656+
assert_equal(bals, wallet.getbalances())
657+
640658
def test_default_wallet(self):
641659
self.log.info("Test migration of the wallet named as the empty string")
642660
wallet = self.create_legacy_wallet("")
@@ -1529,6 +1547,7 @@ def run_test(self):
15291547
self.test_unloaded_by_path()
15301548
self.test_wallet_with_relative_path()
15311549
self.test_wallet_with_path_ending_in_slash()
1550+
self.test_wallet_with_path_ending_in_relative_specifier()
15321551
self.test_default_wallet()
15331552
self.test_direct_file()
15341553
self.test_addressbook()

0 commit comments

Comments
 (0)