Attempt to start a node with requested rpcallowip and rpcbind parameters, expecting that the node will fail.
(self, allow_ips, addresses)
| 45 | self.stop_nodes() |
| 46 | |
| 47 | def run_invalid_bind_test(self, allow_ips, addresses): |
| 48 | ''' |
| 49 | Attempt to start a node with requested rpcallowip and rpcbind |
| 50 | parameters, expecting that the node will fail. |
| 51 | ''' |
| 52 | self.log.info(f'Invalid bind test for {addresses}') |
| 53 | base_args = ['-disablewallet', '-nolisten'] |
| 54 | if allow_ips: |
| 55 | base_args += ['-rpcallowip=' + x for x in allow_ips] |
| 56 | init_error = 'Error: Invalid port specified in -rpcbind: ' |
| 57 | for addr in addresses: |
| 58 | self.nodes[0].assert_start_raises_init_error(base_args + [f'-rpcbind={addr}'], init_error + f"'{addr}'") |
| 59 | |
| 60 | def run_allowip_test(self, allow_ips, rpchost, rpcport): |
| 61 | ''' |
no test coverage detected