mirror of https://github.com/fail2ban/fail2ban
test_smtp inconsistency for py3+IPv6
It appears that, under Python3, on an IPv6 enabled machine, the testing SMTP server on 'localhost' can turn out to listen on ::1 only, which makes those tests break if the SMTP client part uses 127.0.0.1 directly. Using 'localhost' there as well makes the tests pass.pull/1739/head
parent
873f97c6c5
commit
7b93f111e1
|
@ -67,7 +67,7 @@ class SMTPActionTest(unittest.TestCase):
|
||||||
port = self.smtpd.socket.getsockname()[1]
|
port = self.smtpd.socket.getsockname()[1]
|
||||||
|
|
||||||
self.action = customActionModule.Action(
|
self.action = customActionModule.Action(
|
||||||
self.jail, "test", host="127.0.0.1:%i" % port)
|
self.jail, "test", host="localhost:%i" % port)
|
||||||
|
|
||||||
## because of bug in loop (see loop in asyncserver.py) use it's loop instead of asyncore.loop:
|
## because of bug in loop (see loop in asyncserver.py) use it's loop instead of asyncore.loop:
|
||||||
self._active = True
|
self._active = True
|
||||||
|
|
Loading…
Reference in New Issue