aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/test_node.py
diff options
context:
space:
mode:
authorSjors Provoost <sjors@sprovoost.nl>2018-03-06 16:48:15 -0500
committerSjors Provoost <sjors@sprovoost.nl>2018-03-06 16:48:15 -0500
commitb156ff7c30175f5d23bde97a56a2c34af2196466 (patch)
tree2dbaaf83b0c4b0692269ad762917d8feb48a02b2 /test/functional/test_framework/test_node.py
parentd3f4dd313e5fe58903caf2f4d04827e7f7944e17 (diff)
[tests] bind functional test nodes to 127.0.0.1
Prevents OSX firewall allow-this-application-to-accept-inbound-connections permission popups and is generally safer. To prevent binding to 127.0.0.1, set self.bind_to_localhost_only = False.
Diffstat (limited to 'test/functional/test_framework/test_node.py')
-rwxr-xr-xtest/functional/test_framework/test_node.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
index 93a052f785..86e44e4c97 100755
--- a/test/functional/test_framework/test_node.py
+++ b/test/functional/test_framework/test_node.py
@@ -16,6 +16,7 @@ import time
from .authproxy import JSONRPCException
from .util import (
+ append_config,
assert_equal,
get_rpc_proxy,
rpc_url,
@@ -42,7 +43,7 @@ class TestNode():
To make things easier for the test writer, any unrecognised messages will
be dispatched to the RPC connection."""
- def __init__(self, i, dirname, extra_args, rpchost, timewait, binary, stderr, mocktime, coverage_dir, use_cli=False):
+ def __init__(self, i, dirname, rpchost, timewait, binary, stderr, mocktime, coverage_dir, extra_conf=None, extra_args=None, use_cli=False):
self.index = i
self.datadir = os.path.join(dirname, "node" + str(i))
self.rpchost = rpchost
@@ -57,6 +58,8 @@ class TestNode():
self.binary = binary
self.stderr = stderr
self.coverage_dir = coverage_dir
+ if extra_conf != None:
+ append_config(dirname, i, extra_conf)
# Most callers will just need to add extra args to the standard list below.
# For those callers that need more flexibity, they can just set the args property directly.
# Note that common args are set in the config file (see initialize_datadir)