Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_multiwallet.py
Show First 20 Lines • Show All 219 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
# Fail to load duplicate wallets | # Fail to load duplicate wallets | ||||
assert_raises_rpc_error(-4, 'Wallet file verification failed: Error loading wallet w1. Duplicate -wallet filename specified.', | assert_raises_rpc_error(-4, 'Wallet file verification failed: Error loading wallet w1. Duplicate -wallet filename specified.', | ||||
self.nodes[0].loadwallet, wallet_names[0]) | self.nodes[0].loadwallet, wallet_names[0]) | ||||
# Fail to load if one wallet is a copy of another | # Fail to load if one wallet is a copy of another | ||||
assert_raises_rpc_error(-1, "BerkeleyBatch: Can't open database w8_copy (duplicates fileid", | assert_raises_rpc_error(-1, "BerkeleyBatch: Can't open database w8_copy (duplicates fileid", | ||||
self.nodes[0].loadwallet, 'w8_copy') | self.nodes[0].loadwallet, 'w8_copy') | ||||
# Fail to load if one wallet is a copy of another. | |||||
# Test this twice to make sure that we don't re-introduce https://github.com/bitcoin/bitcoin/issues/14304 | |||||
assert_raises_rpc_error(-1, "BerkeleyBatch: 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'", | assert_raises_rpc_error(-4, "Wallet file verification failed: Invalid -wallet path 'w8_symlink'", | ||||
self.nodes[0].loadwallet, 'w8_symlink') | self.nodes[0].loadwallet, 'w8_symlink') | ||||
# Fail to load if a directory is specified that doesn't contain a wallet | # Fail to load if a directory is specified that doesn't contain a wallet | ||||
os.mkdir(wallet_dir('empty_wallet_dir')) | os.mkdir(wallet_dir('empty_wallet_dir')) | ||||
assert_raises_rpc_error(-18, "Directory empty_wallet_dir does not contain a wallet.dat file", | assert_raises_rpc_error(-18, "Directory empty_wallet_dir does not contain a wallet.dat file", | ||||
self.nodes[0].loadwallet, 'empty_wallet_dir') | self.nodes[0].loadwallet, 'empty_wallet_dir') | ||||
▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines |