mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Merge #16234: test: Add test for unknown args
fa7dd88b71 test: Add test for unknown args (MarcoFalke) Pull request description: Currently uncovered. Further reading: * https://marcofalke.github.io/btc_cov/total.coverage/src/util/system.cpp.gcov.html * Fail on unknown config file options #15021 ACKs for commit fa7dd8: promag: ACK fa7dd88b71a1c6641bd450fae29a4a31849b1afd, tests looks good to me. hebasto: ACK fa7dd88b71a1c6641bd450fae29a4a31849b1afd, I have tested the code. Tree-SHA512: 86ab370ce8e85925f945a52e81457b5678d71bbabcef01205a97782b780003f363552e0bad1ff678bccc784f82c6b511c3b88de3f8f25f62b0b713c387950564
This commit is contained in:
parent
3c6ae97332
commit
0bcf02739b
@ -21,6 +21,16 @@ class ConfArgsTest(BitcoinTestFramework):
|
||||
with open(os.path.join(self.nodes[0].datadir, 'dash.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 -')
|
||||
|
Loading…
Reference in New Issue
Block a user