aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_config_args.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/feature_config_args.py')
-rwxr-xr-xtest/functional/feature_config_args.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/test/functional/feature_config_args.py b/test/functional/feature_config_args.py
index 460e664c48..f0d6bc21e6 100755
--- a/test/functional/feature_config_args.py
+++ b/test/functional/feature_config_args.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2017-2018 The Bitcoin Core developers
+# Copyright (c) 2017-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test various command line arguments and configuration file parameters."""
@@ -21,10 +21,24 @@ class ConfArgsTest(BitcoinTestFramework):
with open(os.path.join(self.nodes[0].datadir, 'bitcoin.conf'), 'a', encoding='utf-8') as conf:
conf.write('includeconf={}\n'.format(inc_conf_file_path))
+ self.nodes[0].assert_start_raises_init_error(
+ expected_msg='Error parsing command line arguments: Invalid parameter -dash_cli',
+ extra_args=['-dash_cli=1'],
+ )
+ with open(inc_conf_file_path, 'w', encoding='utf-8') as conf:
+ conf.write('dash_conf=1\n')
+ with self.nodes[0].assert_debug_log(expected_msgs=['Ignoring unknown configuration value dash_conf']):
+ self.start_node(0)
+ self.stop_node(0)
+
with open(inc_conf_file_path, 'w', encoding='utf-8') as conf:
conf.write('-dash=1\n')
self.nodes[0].assert_start_raises_init_error(expected_msg='Error reading configuration file: parse error on line 1: -dash=1, options in configuration file must be specified without leading -')
+ with open(inc_conf_file_path, 'w', encoding='utf8') as conf:
+ conf.write("wallet=foo\n")
+ self.nodes[0].assert_start_raises_init_error(expected_msg='Error: Config setting for -wallet only applied on regtest network when in [regtest] section.')
+
with open(inc_conf_file_path, 'w', encoding='utf-8') as conf:
conf.write('nono\n')
self.nodes[0].assert_start_raises_init_error(expected_msg='Error reading configuration file: parse error on line 1: nono, if you intended to specify a negated option, use nono=1 instead')
@@ -57,9 +71,16 @@ class ConfArgsTest(BitcoinTestFramework):
with open(inc_conf_file2_path, 'w', encoding='utf-8') as conf:
conf.write('') # clear
+ def test_log_buffer(self):
+ with self.nodes[0].assert_debug_log(expected_msgs=['Warning: parsed potentially confusing double-negative -connect=0']):
+ self.start_node(0, extra_args=['-noconnect=0'])
+ self.stop_node(0)
+
def run_test(self):
self.stop_node(0)
+ self.test_log_buffer()
+
self.test_config_file_parser()
# Remove the -datadir argument so it doesn't override the config file