diff --git a/fail2ban/tests/filtertestcase.py b/fail2ban/tests/filtertestcase.py index dbc3bafc..4807bed5 100644 --- a/fail2ban/tests/filtertestcase.py +++ b/fail2ban/tests/filtertestcase.py @@ -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):