Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_config_args.py
Show All 36 Lines | def test_config_file_parser(self): | ||||
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') | conf.write('server=1\nrpcuser=someuser\nrpcpassword=some#pass') | ||||
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 3, using # in rpcpassword can be ambiguous and should be avoided') | 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: | with open(inc_conf_file_path, 'w', encoding='utf-8') as conf: | ||||
conf.write('') # clear | 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): | def run_test(self): | ||||
self.stop_node(0) | self.stop_node(0) | ||||
self.test_log_buffer() | |||||
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 | ||||
self.nodes[0].remove_default_args(["-datadir"]) | self.nodes[0].remove_default_args(["-datadir"]) | ||||
default_data_dir = self.nodes[0].datadir | default_data_dir = self.nodes[0].datadir | ||||
new_data_dir = os.path.join(default_data_dir, 'newdatadir') | new_data_dir = os.path.join(default_data_dir, 'newdatadir') | ||||
new_data_dir_2 = os.path.join(default_data_dir, 'newdatadir2') | new_data_dir_2 = os.path.join(default_data_dir, 'newdatadir2') | ||||
Show All 36 Lines |