Skip to content

Commit

Permalink
Use /var/run/syslog on macosx for syslog tests.
Browse files Browse the repository at this point in the history
- This patch is based on zaictev review.
- Fixes bug 1206560.

Change-Id: I41f3d485df41fe443784f803b276712405fe72c6
  • Loading branch information
Chmouel Boudjnah committed Aug 6, 2013
1 parent 3741fbe commit 64756f8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions test/unit/common/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,16 @@ def syslog_handler_catcher(*args, **kwargs):
utils.get_logger({
'log_facility': 'LOG_LOCAL3',
}, 'server', log_route='server')
self.assertEquals([
((), {'address': '/dev/log',
'facility': orig_sysloghandler.LOG_LOCAL3})],
syslog_handler_args)
expected_args = [((), {'address': '/dev/log',
'facility': orig_sysloghandler.LOG_LOCAL3})]
if not os.path.exists('/dev/log') or \
os.path.isfile('/dev/log') or \
os.path.isdir('/dev/log'):
# Since socket on OSX is in /var/run/syslog, there will be
# a fallback to UDP.
expected_args.append(((),
{'facility': orig_sysloghandler.LOG_LOCAL3}))
self.assertEquals(expected_args, syslog_handler_args)

syslog_handler_args = []
utils.get_logger({
Expand Down

0 comments on commit 64756f8

Please sign in to comment.