mirror of https://github.com/fail2ban/fail2ban
Combine ignore cause unitests
parent
3186df55e3
commit
aa848a5f9e
|
@ -275,6 +275,12 @@ class IgnoreIP(LogCaptureTestCase):
|
|||
self.filter.addIgnoreIP("93.184.216.34")
|
||||
self.assertTrue(self._is_logged("Ignore 93.184.216.34"))
|
||||
|
||||
def testIgnoreCause(self):
|
||||
ip = "93.184.216.34"
|
||||
for ignore_source in ["dns", "ip", "command"]:
|
||||
self.filter.logIgnoreIp(ip, True, ignore_source=ignore_source)
|
||||
self.assertTrue(self._is_logged("[%s] Ignore %s by %s" % (self.jail.name, ip, ignore_source)))
|
||||
|
||||
|
||||
class IgnoreIPDNS(IgnoreIP):
|
||||
|
||||
|
|
Loading…
Reference in New Issue