Changeset View
Changeset View
Standalone View
Standalone View
qa/rpc-tests/rpcbind_test.py
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
non_loopback_ip = None | non_loopback_ip = None | ||||
for name, ip in all_interfaces(): | for name, ip in all_interfaces(): | ||||
if ip != '127.0.0.1': | if ip != '127.0.0.1': | ||||
non_loopback_ip = ip | non_loopback_ip = ip | ||||
break | break | ||||
if non_loopback_ip is None: | if non_loopback_ip is None: | ||||
assert( | assert( | ||||
not 'This test requires at least one non-loopback IPv4 interface') | not 'This test requires at least one non-loopback IPv4 interface') | ||||
print("Using interface %s for testing" % non_loopback_ip) | self.log.info("Using interface %s for testing" % non_loopback_ip) | ||||
defaultport = rpc_port(0) | defaultport = rpc_port(0) | ||||
# check default without rpcallowip (IPv4 and IPv6 localhost) | # check default without rpcallowip (IPv4 and IPv6 localhost) | ||||
self.run_bind_test(None, '127.0.0.1', [], | self.run_bind_test(None, '127.0.0.1', [], | ||||
[('127.0.0.1', defaultport), ('::1', defaultport)]) | [('127.0.0.1', defaultport), ('::1', defaultport)]) | ||||
# check default with rpcallowip (IPv6 any) | # check default with rpcallowip (IPv6 any) | ||||
self.run_bind_test(['127.0.0.1'], '127.0.0.1', [], | self.run_bind_test(['127.0.0.1'], '127.0.0.1', [], | ||||
Show All 35 Lines |