mirror of https://github.com/fail2ban/fail2ban
commit
cafc77d7db
|
@ -224,7 +224,7 @@ class CommandActionTest(LogCaptureTestCase):
|
||||||
# First test if can kill the bastard
|
# First test if can kill the bastard
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
RuntimeError, CommandAction.executeCmd, 'bash %s' % tmpFilename, timeout=.1)
|
RuntimeError, CommandAction.executeCmd, 'bash %s' % tmpFilename, timeout=.1)
|
||||||
# Verify that the proccess itself got killed
|
# Verify that the process itself got killed
|
||||||
self.assertFalse(pid_exists(getnastypid())) # process should have been killed
|
self.assertFalse(pid_exists(getnastypid())) # process should have been killed
|
||||||
self.assertTrue(self._is_logged('timed out'))
|
self.assertTrue(self._is_logged('timed out'))
|
||||||
self.assertTrue(self._is_logged('killed with SIGTERM'))
|
self.assertTrue(self._is_logged('killed with SIGTERM'))
|
||||||
|
@ -233,7 +233,7 @@ class CommandActionTest(LogCaptureTestCase):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
RuntimeError, CommandAction.executeCmd, 'out=`bash %s`; echo ALRIGHT' % tmpFilename,
|
RuntimeError, CommandAction.executeCmd, 'out=`bash %s`; echo ALRIGHT' % tmpFilename,
|
||||||
timeout=.2)
|
timeout=.2)
|
||||||
# Verify that the proccess itself got killed
|
# Verify that the process itself got killed
|
||||||
self.assertFalse(pid_exists(getnastypid()))
|
self.assertFalse(pid_exists(getnastypid()))
|
||||||
self.assertTrue(self._is_logged('timed out'))
|
self.assertTrue(self._is_logged('timed out'))
|
||||||
self.assertTrue(self._is_logged('killed with SIGTERM'))
|
self.assertTrue(self._is_logged('killed with SIGTERM'))
|
||||||
|
|
Loading…
Reference in New Issue