commit 75325da09091f3ae800a2efbcde1a016617e5f1a Author: Steven Hiscocks Date: Wed Mar 19 19:21:23 2014 +0000 TST: Skip SYSLOG log target test if '/dev/log' not present diff --git a/fail2ban/tests/servertestcase.py b/fail2ban/tests/servertestcase.py index 231aecd..c4163db 100644 --- a/fail2ban/tests/servertestcase.py +++ b/fail2ban/tests/servertestcase.py @@ -678,6 +678,12 @@ class TransmitterLogging(TransmitterBase): self.setGetTest("logtarget", "STDOUT") self.setGetTest("logtarget", "STDERR") + + def testLogTargetSYSLOG(self): + if not os.path.exists("/dev/log") and sys.version_info >= (2, 7): + raise unittest.SkipTest("'/dev/log' not present") + elif not os.path.exists("/dev/log"): + return self.setGetTest("logtarget", "SYSLOG") def testLogLevel(self):