(self)
| 156 | [('127.0.0.1', self.defaultport), ('::1', self.defaultport)]) |
| 157 | |
| 158 | def _run_nonloopback_tests(self): |
| 159 | self.log.info("Using interface %s for testing" % self.non_loopback_ip) |
| 160 | |
| 161 | # check only non-loopback interface |
| 162 | self.run_bind_test([self.non_loopback_ip], self.non_loopback_ip, [self.non_loopback_ip], |
| 163 | [(self.non_loopback_ip, self.defaultport)]) |
| 164 | |
| 165 | # Check that with invalid rpcallowip, we are denied |
| 166 | self.run_allowip_test([self.non_loopback_ip], self.non_loopback_ip, self.defaultport) |
| 167 | if self.options.usecli: |
| 168 | self.log.info("Skip negative IP test with CLI, because the CLI can not throw the tested exception type") |
| 169 | return |
| 170 | assert_raises_rpc_error(-342, "non-JSON HTTP response with '403 Forbidden' from server", self.run_allowip_test, ['1.1.1.1'], self.non_loopback_ip, self.defaultport) |
| 171 | |
| 172 | if __name__ == '__main__': |
| 173 | RPCBindTest(__file__).main() |
no test coverage detected