test: Ensure that recursive -includeconf produces appropriate warnings
This commit is contained in:
parent
c5bcc7dbe9
commit
2352aa9f36
1 changed files with 2 additions and 2 deletions
|
@ -53,11 +53,11 @@ class IncludeConfTest(BitcoinTestFramework):
|
||||||
self.log.info("-includeconf cannot be used recursively. subversion should end with 'main; relative)/'")
|
self.log.info("-includeconf cannot be used recursively. subversion should end with 'main; relative)/'")
|
||||||
with open(os.path.join(self.options.tmpdir, "node0", "relative.conf"), "a", encoding="utf8") as f:
|
with open(os.path.join(self.options.tmpdir, "node0", "relative.conf"), "a", encoding="utf8") as f:
|
||||||
f.write("includeconf=relative2.conf\n")
|
f.write("includeconf=relative2.conf\n")
|
||||||
|
|
||||||
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(0, expected_stderr="warning: -includeconf cannot be used from included files; ignoring -includeconf=relative2.conf")
|
||||||
|
|
||||||
self.log.info("multiple -includeconf args can be used from the base config file. subversion should end with 'main; relative; relative2)/'")
|
self.log.info("multiple -includeconf args can be used from the base config file. subversion should end with 'main; relative; relative2)/'")
|
||||||
with open(os.path.join(self.options.tmpdir, "node0", "relative.conf"), "w", encoding="utf8") as f:
|
with open(os.path.join(self.options.tmpdir, "node0", "relative.conf"), "w", encoding="utf8") as f:
|
||||||
|
@ -66,7 +66,7 @@ class IncludeConfTest(BitcoinTestFramework):
|
||||||
with open(os.path.join(self.options.tmpdir, "node0", "bitcoin.conf"), "a", encoding='utf8') as f:
|
with open(os.path.join(self.options.tmpdir, "node0", "bitcoin.conf"), "a", encoding='utf8') as f:
|
||||||
f.write("includeconf=relative2.conf\n")
|
f.write("includeconf=relative2.conf\n")
|
||||||
|
|
||||||
self.restart_node(0)
|
self.start_node(0)
|
||||||
|
|
||||||
subversion = self.nodes[0].getnetworkinfo()["subversion"]
|
subversion = self.nodes[0].getnetworkinfo()["subversion"]
|
||||||
assert subversion.endswith("main; relative; relative2)/")
|
assert subversion.endswith("main; relative; relative2)/")
|
||||||
|
|
Loading…
Reference in a new issue