aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_config_args.py
diff options
context:
space:
mode:
authornthumann <me@n-thumann.de>2021-08-04 12:24:40 +0200
committernthumann <me@n-thumann.de>2021-08-04 14:54:05 +0200
commit127b4608e9dbb8217c74c9332e82fcec8c326fa8 (patch)
treecc52eaa09a38765f10c2e424fb8e08bb83694b40 /test/functional/feature_config_args.py
parent6bb54708e6457f21596793a7149dc6dfea1dc871 (diff)
downloadbitcoin-127b4608e9dbb8217c74c9332e82fcec8c326fa8.tar.xz
test: Check if specified config file cannot be opened
Diffstat (limited to 'test/functional/feature_config_args.py')
-rwxr-xr-xtest/functional/feature_config_args.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/feature_config_args.py b/test/functional/feature_config_args.py
index 24c8a8987a..9e99cd549d 100755
--- a/test/functional/feature_config_args.py
+++ b/test/functional/feature_config_args.py
@@ -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])