mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
TST: Skip SYSLOG log target test if '/dev/log' not present
Conflicts: testcases/servertestcase.py -- probably jumped over another commit in this cherry-pick which resulted in conflict
This commit is contained in:
parent
3a1a1f3ad7
commit
09b2016c05
1 changed files with 7 additions and 2 deletions
|
|
@ -513,8 +513,13 @@ class TransmitterLogging(TransmitterBase):
|
|||
|
||||
self.setGetTest("logtarget", "STDOUT")
|
||||
self.setGetTest("logtarget", "STDERR")
|
||||
if sys.platform.lower().startswith('linux'):
|
||||
self.setGetTest("logtarget", "SYSLOG")
|
||||
|
||||
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):
|
||||
self.setGetTest("loglevel", "4", 4)
|
||||
|
|
|
|||
Loading…
Reference in a new issue