mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
Combine ignore cause unitests
This commit is contained in:
parent
3186df55e3
commit
aa848a5f9e
1 changed files with 6 additions and 0 deletions
|
|
@ -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 a new issue