mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-16 05:00:42 +02:00
test: Fix wallet_multiwallet test issue on Windows
This commit is contained in:
parent
d94777bd52
commit
fa00ff0399
@ -104,7 +104,7 @@ class MultiWalletTest(BitcoinTestFramework):
|
|||||||
# w8 - to verify existing wallet file is loaded correctly. Not tested for SQLite wallets as this is a deprecated BDB behavior.
|
# w8 - to verify existing wallet file is loaded correctly. Not tested for SQLite wallets as this is a deprecated BDB behavior.
|
||||||
# '' - to verify default wallet file is created correctly
|
# '' - to verify default wallet file is created correctly
|
||||||
to_create = ['w1', 'w2', 'w3', 'w', 'sub/w5', 'w7_symlink']
|
to_create = ['w1', 'w2', 'w3', 'w', 'sub/w5', 'w7_symlink']
|
||||||
in_wallet_dir = to_create.copy() # Wallets in the wallet dir
|
in_wallet_dir = [w.replace('/', os.path.sep) for w in to_create] # Wallets in the wallet dir
|
||||||
in_wallet_dir.append('w7') # w7 is not loaded or created, but will be listed by listwalletdir because w7_symlink
|
in_wallet_dir.append('w7') # w7 is not loaded or created, but will be listed by listwalletdir because w7_symlink
|
||||||
to_create.append(os.path.join(self.options.tmpdir, 'extern/w6')) # External, not in the wallet dir, so we need to avoid adding it to in_wallet_dir
|
to_create.append(os.path.join(self.options.tmpdir, 'extern/w6')) # External, not in the wallet dir, so we need to avoid adding it to in_wallet_dir
|
||||||
to_load = [self.default_wallet_name]
|
to_load = [self.default_wallet_name]
|
||||||
@ -298,7 +298,6 @@ class MultiWalletTest(BitcoinTestFramework):
|
|||||||
# Fail to load if one wallet is a copy of another, test this twice to make sure that we don't re-introduce #14304
|
# Fail to load if one wallet is a copy of another, test this twice to make sure that we don't re-introduce #14304
|
||||||
assert_raises_rpc_error(-4, "BerkeleyDatabase: Can't open database w8_copy (duplicates fileid", self.nodes[0].loadwallet, 'w8_copy')
|
assert_raises_rpc_error(-4, "BerkeleyDatabase: Can't open database w8_copy (duplicates fileid", self.nodes[0].loadwallet, 'w8_copy')
|
||||||
|
|
||||||
|
|
||||||
# Fail to load if wallet file is a symlink
|
# Fail to load if wallet file is a symlink
|
||||||
assert_raises_rpc_error(-4, "Wallet file verification failed. Invalid -wallet path 'w8_symlink'", self.nodes[0].loadwallet, 'w8_symlink')
|
assert_raises_rpc_error(-4, "Wallet file verification failed. Invalid -wallet path 'w8_symlink'", self.nodes[0].loadwallet, 'w8_symlink')
|
||||||
|
|
||||||
@ -397,5 +396,6 @@ class MultiWalletTest(BitcoinTestFramework):
|
|||||||
self.nodes[0].unloadwallet(wallet)
|
self.nodes[0].unloadwallet(wallet)
|
||||||
self.nodes[1].loadwallet(wallet)
|
self.nodes[1].loadwallet(wallet)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
MultiWalletTest().main()
|
MultiWalletTest().main()
|
||||||
|
Loading…
Reference in New Issue
Block a user