aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_includeconf.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/feature_includeconf.py')
-rwxr-xr-xtest/functional/feature_includeconf.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/test/functional/feature_includeconf.py b/test/functional/feature_includeconf.py
index d3f1be6c3a..1ead2fcb02 100755
--- a/test/functional/feature_includeconf.py
+++ b/test/functional/feature_includeconf.py
@@ -15,9 +15,8 @@ Verify that:
file.
"""
import os
-import tempfile
-from test_framework.test_framework import BitcoinTestFramework, assert_equal
+from test_framework.test_framework import BitcoinTestFramework
class IncludeConfTest(BitcoinTestFramework):
def set_test_params(self):
@@ -44,20 +43,18 @@ class IncludeConfTest(BitcoinTestFramework):
self.log.info("-includeconf cannot be used as command-line arg. subversion should still end with 'main; relative)/'")
self.stop_node(0)
- with tempfile.SpooledTemporaryFile(max_size=2**16) as log_stderr:
- self.start_node(0, extra_args=["-includeconf=relative2.conf"], stderr=log_stderr)
- subversion = self.nodes[0].getnetworkinfo()["subversion"]
- assert subversion.endswith("main; relative)/")
- log_stderr.seek(0)
- stderr = log_stderr.read().decode('utf-8').strip()
- assert_equal(stderr, 'warning: -includeconf cannot be used from commandline; ignoring -includeconf=relative2.conf')
+ self.start_node(0, extra_args=["-includeconf=relative2.conf"])
+
+ subversion = self.nodes[0].getnetworkinfo()["subversion"]
+ assert subversion.endswith("main; relative)/")
+ self.stop_node(0, expected_stderr="warning: -includeconf cannot be used from commandline; ignoring -includeconf=relative2.conf")
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:
f.write("includeconf=relative2.conf\n")
- self.restart_node(0)
+ self.start_node(0)
subversion = self.nodes[0].getnetworkinfo()["subversion"]
assert subversion.endswith("main; relative)/")