Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_config_args.py
Show All 26 Lines | def test_config_file_parser(self): | ||||
expected_msg='Error reading configuration file: parse error on line 1: -dash=1, options in configuration file must be specified without leading -') | 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='utf-8') as conf: | with open(inc_conf_file_path, 'w', encoding='utf-8') as conf: | ||||
conf.write('nono\n') | conf.write('nono\n') | ||||
self.nodes[0].assert_start_raises_init_error( | 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') | expected_msg='Error reading configuration file: parse error on line 1: nono, if you intended to specify a negated option, use nono=1 instead') | ||||
with open(inc_conf_file_path, 'w', encoding='utf-8') as conf: | with open(inc_conf_file_path, 'w', encoding='utf-8') as conf: | ||||
conf.write('server=1\nrpcuser=someuser\nrpcpassword=some#pass') | |||||
self.nodes[0].assert_start_raises_init_error( | |||||
expected_msg='Error reading configuration file: parse error on line 3, using # in rpcpassword can be ambiguous and should be avoided') | |||||
with open(inc_conf_file_path, 'w', encoding='utf-8') as conf: | |||||
conf.write('') # clear | conf.write('') # clear | ||||
def run_test(self): | def run_test(self): | ||||
self.stop_node(0) | self.stop_node(0) | ||||
self.test_config_file_parser() | self.test_config_file_parser() | ||||
# Remove the -datadir argument so it doesn't override the config file | # Remove the -datadir argument so it doesn't override the config file | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |