Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_includeconf.py
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
self.start_node(0) | self.start_node(0) | ||||
subversion = self.nodes[0].getnetworkinfo()["subversion"] | subversion = self.nodes[0].getnetworkinfo()["subversion"] | ||||
assert subversion.endswith("main; relative)/") | assert subversion.endswith("main; relative)/") | ||||
self.stop_node( | self.stop_node( | ||||
0, expected_stderr="warning: -includeconf cannot be used from included files; ignoring -includeconf=relative2.conf") | 0, expected_stderr="warning: -includeconf cannot be used from included files; ignoring -includeconf=relative2.conf") | ||||
self.log.info("-includeconf cannot contain invalid arg") | self.log.info("-includeconf cannot contain invalid arg") | ||||
with open(os.path.join(self.options.tmpdir, "node0", "relative.conf"), "w", encoding="utf8") as f: | |||||
f.write("foo=bar\n") | # Commented out as long as we ignore invalid arguments in configuration files | ||||
self.nodes[0].assert_start_raises_init_error( | # with open(os.path.join(self.options.tmpdir, "node0", "relative.conf"), "w", encoding="utf8") as f: | ||||
expected_msg="Error reading configuration file: Invalid configuration value foo") | # f.write("foo=bar\n") | ||||
# self.nodes[0].assert_start_raises_init_error( | |||||
# expected_msg="Error reading configuration file: Invalid configuration value foo") | |||||
# See https://github.com/bitcoin/bitcoin/pull/13799 | |||||
self.log.info("-includeconf cannot be invalid path") | self.log.info("-includeconf cannot be invalid path") | ||||
os.remove(os.path.join(self.options.tmpdir, "node0", "relative.conf")) | os.remove(os.path.join(self.options.tmpdir, "node0", "relative.conf")) | ||||
self.nodes[0].assert_start_raises_init_error( | self.nodes[0].assert_start_raises_init_error( | ||||
expected_msg="Error reading configuration file: Failed to include configuration file relative.conf") | expected_msg="Error reading configuration file: Failed to include configuration file relative.conf") | ||||
self.log.info( | self.log.info( | ||||
"multiple -includeconf args can be used from the base config file. subversion should end with 'main; relative; relative2)/'") | "multiple -includeconf args can be used from the base config file. subversion should end with 'main; relative; relative2)/'") | ||||
Show All 15 Lines |