Skip to content

Commit fa7dd88

Browse files
author
MarcoFalke
committed
test: Add test for unknown args
1 parent 0853d8d commit fa7dd88

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/functional/feature_config_args.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ def test_config_file_parser(self):
2121
with open(os.path.join(self.nodes[0].datadir, 'bitcoin.conf'), 'a', encoding='utf-8') as conf:
2222
conf.write('includeconf={}\n'.format(inc_conf_file_path))
2323

24+
self.nodes[0].assert_start_raises_init_error(
25+
expected_msg='Error parsing command line arguments: Invalid parameter -dash_cli',
26+
extra_args=['-dash_cli=1'],
27+
)
28+
with open(inc_conf_file_path, 'w', encoding='utf-8') as conf:
29+
conf.write('dash_conf=1\n')
30+
with self.nodes[0].assert_debug_log(expected_msgs=['Ignoring unknown configuration value dash_conf']):
31+
self.start_node(0)
32+
self.stop_node(0)
33+
2434
with open(inc_conf_file_path, 'w', encoding='utf-8') as conf:
2535
conf.write('-dash=1\n')
2636
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 -')

0 commit comments

Comments
 (0)