aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-02-04 18:50:21 +0000
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-03-12 23:24:11 +0000
commitfe95f84542f81862e9759503416d9da9f67d191b (patch)
treeb9868e1ecd82923729726239b3b1b2a9c7af6e2b /test
parent2e9e904a5d58e0d288e9abc1cbc602a8674bc1a2 (diff)
qa: Test .walletlock file is closed
Github-Pull: #15297 Rebased-From: d3bf3b9
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/wallet_multiwallet.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/wallet_multiwallet.py b/test/functional/wallet_multiwallet.py
index bf33d3c628..712a10b731 100755
--- a/test/functional/wallet_multiwallet.py
+++ b/test/functional/wallet_multiwallet.py
@@ -311,6 +311,14 @@ class MultiWalletTest(BitcoinTestFramework):
self.nodes[0].loadwallet(wallet_name)
assert_equal(rpc.getaddressinfo(addr)['ismine'], True)
+ # Test .walletlock file is closed
+ self.start_node(1)
+ wallet = os.path.join(self.options.tmpdir, 'my_wallet')
+ self.nodes[0].createwallet(wallet)
+ assert_raises_rpc_error(-4, "Error initializing wallet database environment", self.nodes[1].loadwallet, wallet)
+ self.nodes[0].unloadwallet(wallet)
+ self.nodes[1].loadwallet(wallet)
+
if __name__ == '__main__':
MultiWalletTest().main()