Browse Source

TST: Skip SYSLOG log target test if '/dev/log' not present

pull/663/head
Steven Hiscocks 11 years ago
parent
commit
75325da090
  1. 6
      fail2ban/tests/servertestcase.py

6
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):

Loading…
Cancel
Save