diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-12-04 13:05:55 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-12-04 13:07:41 +0100 |
commit | abbf4be181e0ac42ef083a35d0bf4188c5eb43eb (patch) | |
tree | 0eba52bbc6138ff30608131308773057d6cc99d5 /test | |
parent | 88445889f1b36d3ebfdae2211a294724d7420566 (diff) | |
parent | f3cf95ffdfda935f28260eb34bf20c1449a200c5 (diff) |
Merge #14861: tests: Modify rpc_bind to conform to #14532 behaviour.
f3cf95ffd tests: Modify rpc_bind to conform to #14532 behaviour. (Carl Dong)
Pull request description:
Fixes: https://github.com/bitcoin/bitcoin/issues/14792
Tree-SHA512: 5ee63a06c92dae5406515e9e483188309b82e07b760f363d8c8ec46a42fe5f75f88724759b0ac8ef596ee28a135626e0582f575855c5dfec2fbfff2249a109f7
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/rpc_bind.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/functional/rpc_bind.py b/test/functional/rpc_bind.py index 53916d5290..c23aa13685 100755 --- a/test/functional/rpc_bind.py +++ b/test/functional/rpc_bind.py @@ -48,9 +48,12 @@ class RPCBindTest(BitcoinTestFramework): at a non-localhost IP. ''' self.log.info("Allow IP test for %s:%d" % (rpchost, rpcport)) - base_args = ['-disablewallet', '-nolisten'] + ['-rpcallowip='+x for x in allow_ips] + node_args = \ + ['-disablewallet', '-nolisten'] + \ + ['-rpcallowip='+x for x in allow_ips] + \ + ['-rpcbind='+addr for addr in ['127.0.0.1', "%s:%d" % (rpchost, rpcport)]] # Bind to localhost as well so start_nodes doesn't hang self.nodes[0].rpchost = None - self.start_nodes([base_args]) + self.start_nodes([node_args]) # connect to node through non-loopback interface node = get_rpc_proxy(rpc_url(self.nodes[0].datadir, 0, "%s:%d" % (rpchost, rpcport)), 0, coveragedir=self.options.coveragedir) node.getnetworkinfo() @@ -101,9 +104,9 @@ class RPCBindTest(BitcoinTestFramework): # check default without rpcallowip (IPv4 and IPv6 localhost) self.run_bind_test(None, '127.0.0.1', [], [('127.0.0.1', self.defaultport), ('::1', self.defaultport)]) - # check default with rpcallowip (IPv6 any) + # check default with rpcallowip (IPv4 and IPv6 localhost) self.run_bind_test(['127.0.0.1'], '127.0.0.1', [], - [('::0', self.defaultport)]) + [('127.0.0.1', self.defaultport), ('::1', self.defaultport)]) # check only IPv6 localhost (explicit) self.run_bind_test(['[::1]'], '[::1]', ['[::1]'], [('::1', self.defaultport)]) |