unittests not running on OSX

Bug #974583 reported by Chmouel Boudjnah
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Maru Newby

Bug Description

According to termie the unittests are not running on OSX due of Swift requiring /dev/log in virtualenv, this should get fixed. I don't have OSX so it could be hard for me to address.

Revision history for this message
termie (termie) wrote :

quite a few of these are output:

======================================================================
ERROR: test_authorize_succeeds_for_user_role_in_roles (test_swift_auth_middleware.TestAuthorize)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/termie/p/keystone/tests/test_swift_auth_middleware.py", line 96, in setUp
    self.test_auth = swift_auth.filter_factory({})(FakeApp())
  File "/Users/termie/p/keystone/keystone/middleware/swift_auth.py", line 282, in auth_filter
    return SwiftAuth(app, conf)
  File "/Users/termie/p/keystone/keystone/middleware/swift_auth.py", line 95, in __init__
    self.logger = swift_utils.get_logger(conf, log_route='keystoneauth')
  File "/Users/termie/p/keystone/.venv/src/swift/swift/common/utils.py", line 436, in get_logger
    handler = SysLogHandler(address='/dev/log', facility=facility)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/handlers.py", line 705, in __init__
    self._connect_unixsocket(address)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/handlers.py", line 720, in _connect_unixsocket
    self.socket.connect(address)
  File "/Users/termie/p/keystone/.venv/lib/python2.6/site-packages/eventlet/greenio.py", line 167, in connect
    while not socket_connect(fd, address):
  File "/Users/termie/p/keystone/.venv/lib/python2.6/site-packages/eventlet/greenio.py", line 37, in socket_connect
    raise socket.error(err, errno.errorcode[err])
error: [Errno 2] ENOENT

Maru Newby (maru)
Changed in keystone:
assignee: nobody → Maru Newby (maru)
Revision history for this message
Joseph Heck (heckj) wrote :

so much for calling it a unit test :-)

Changed in keystone:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/6324

Changed in keystone:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/6324
Committed: http://github.com/openstack/keystone/commit/12354cd82be452a90d87f18b325bb345f680f7b1
Submitter: Jenkins
Branch: master

commit 12354cd82be452a90d87f18b325bb345f680f7b1
Author: Maru Newby <email address hidden>
Date: Thu Apr 5 19:24:04 2012 -0700

    Stub out swift log configuration during testing

     * s3_token and swift_auth depend on swift.common.utils.get_logger,
       which configures a syslog handler in an OS X-incompatible way.
       This change ensures that get_logger is stubbed out for the
       swift middleware tests to allow the Keystone test suite to execute
       successfully under OS X.
     * Addresses bug 974583

    Change-Id: Ibdb665d1ea65c13ef792767ad66251857629a702

Changed in keystone:
status: In Progress → Fix Committed
Joseph Heck (heckj)
Changed in keystone:
milestone: none → folsom-1
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: folsom-1 → 2012.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.