mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-02 00:38:15 +01:00
[tests] Functional tests call self.start_node(s) and self.stop_node(s)
This commit changes the individual test scripts to call the start_node(s) and stop_node(s) methods in BitcoinTestFramework.
This commit is contained in:
@@ -36,10 +36,10 @@ class RPCBindTest(BitcoinTestFramework):
|
||||
if allow_ips:
|
||||
base_args += ['-rpcallowip=' + x for x in allow_ips]
|
||||
binds = ['-rpcbind='+addr for addr in addresses]
|
||||
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, [base_args + binds], connect_to)
|
||||
self.nodes = self.start_nodes(self.num_nodes, self.options.tmpdir, [base_args + binds], connect_to)
|
||||
pid = bitcoind_processes[0].pid
|
||||
assert_equal(set(get_bind_addrs(pid)), set(expected))
|
||||
stop_nodes(self.nodes)
|
||||
self.stop_nodes()
|
||||
|
||||
def run_allowip_test(self, allow_ips, rpchost, rpcport):
|
||||
'''
|
||||
@@ -47,11 +47,11 @@ class RPCBindTest(BitcoinTestFramework):
|
||||
at a non-localhost IP.
|
||||
'''
|
||||
base_args = ['-disablewallet', '-nolisten'] + ['-rpcallowip='+x for x in allow_ips]
|
||||
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, [base_args])
|
||||
self.nodes = self.start_nodes(self.num_nodes, self.options.tmpdir, [base_args])
|
||||
# connect to node through non-loopback interface
|
||||
node = get_rpc_proxy(rpc_url(0, "%s:%d" % (rpchost, rpcport)), 0)
|
||||
node.getnetworkinfo()
|
||||
stop_nodes(self.nodes)
|
||||
self.stop_nodes()
|
||||
|
||||
def run_test(self):
|
||||
# due to OS-specific network stats queries, this test works only on Linux
|
||||
|
||||
Reference in New Issue
Block a user