mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 03:47:29 -03:00
test: Check if specified config file cannot be opened
This commit is contained in:
parent
6bb54708e6
commit
127b4608e9
1 changed files with 4 additions and 0 deletions
|
@ -248,6 +248,10 @@ class ConfArgsTest(BitcoinTestFramework):
|
|||
|
||||
self.nodes[0].assert_start_raises_init_error(['-conf=' + conf_file], 'Error: Error reading configuration file: specified data directory "' + new_data_dir + '" does not exist.')
|
||||
|
||||
# Check that an explicitly specified config file that cannot be opened fails
|
||||
none_existent_conf_file = os.path.join(default_data_dir, "none_existent_bitcoin.conf")
|
||||
self.nodes[0].assert_start_raises_init_error(['-conf=' + none_existent_conf_file], 'Error: Error reading configuration file: specified config file "' + none_existent_conf_file + '" could not be opened.')
|
||||
|
||||
# Create the directory and ensure the config file now works
|
||||
os.mkdir(new_data_dir)
|
||||
self.start_node(0, ['-conf='+conf_file])
|
||||
|
|
Loading…
Reference in a new issue