mirror of https://github.com/fail2ban/fail2ban
ENH: add a check to testTail to assure correct test logic below it
parent
dd9d1912e8
commit
59da27b9f6
|
@ -852,6 +852,8 @@ class GetFailures(LogCaptureTestCase):
|
|||
LogCaptureTestCase.tearDown(self)
|
||||
|
||||
def testTail(self):
|
||||
# There must be no containters registered, otherwise [-1] indexing would be wrong
|
||||
self.assertEqual(self.filter.getLogs(), [])
|
||||
self.filter.addLogPath(GetFailures.FILENAME_01, tail=True)
|
||||
self.assertEqual(self.filter.getLogs()[-1].getPos(), 1653)
|
||||
self.filter.getLogs()[-1].close()
|
||||
|
|
Loading…
Reference in New Issue