Unit tests fail with keystoneclient master

Bug #1362280 reported by Jim Rollenhagen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Undecided
Jim Rollenhagen

Bug Description

Running Ironic's unit tests with keystoneclient master fails miserably:

$ tox -e py27
[...]
Traceback (most recent call last):
  File "ironic/tests/api/test_acl.py", line 35, in setUp
    super(TestACL, self).setUp()
  File "ironic/tests/api/base.py", line 48, in setUp
    self.app = self._make_app()
  File "ironic/tests/api/test_acl.py", line 53, in _make_app
    return super(TestACL, self)._make_app(enable_acl=True)
  File "ironic/tests/api/base.py", line 71, in _make_app
    return pecan.testing.load_test_app(self.config)
  File "/opt/stack/ironic/.tox/py27/local/lib/python2.7/site-packages/pecan/testing.py", line 35, in load_test_app
    return TestApp(load_app(config, **kwargs))
  File "/opt/stack/ironic/.tox/py27/local/lib/python2.7/site-packages/pecan/core.py", line 194, in load_app
    app = module.app.setup_app(_runtime_conf, **kwargs)
  File "ironic/api/app.py", line 72, in setup_app
    return acl.install(app, cfg.CONF, pecan_config.app.acl_public_routes)
  File "ironic/api/acl.py", line 36, in install
    public_api_routes=public_routes)
  File "ironic/api/middleware/auth_token.py", line 45, in __init__
    super(AuthTokenMiddleware, self).__init__(app, conf)
  File "/opt/stack/ironic/.tox/py27/local/lib/python2.7/site-packages/keystonemiddleware/auth_token.py", line 503, in __init__
    self._session = self._session_factory()
  File "/opt/stack/ironic/.tox/py27/local/lib/python2.7/site-packages/keystonemiddleware/auth_token.py", line 1040, in _session_factory
    tenant_name=self._conf_get('admin_tenant_name'))
  File "/opt/stack/python-keystoneclient/keystoneclient/utils.py", line 318, in inner
    return func(*args, **kwargs)
  File "/opt/stack/python-keystoneclient/keystoneclient/auth/identity/v2.py", line 118, in __init__
    raise TypeError(msg)
TypeError: You need to specify either a username or user_id
[...]
Ran 1186 (+1080) tests in 2.989s (+2.452s)
FAILED (id=22, failures=6 (+6), skips=6)

Looks like this commit broke it: https://review.openstack.org/#/c/113712

The break can be verified with:

    cd ironic
    git clone <email address hidden>:openstack/python-keystoneclient
    source .tox/py27/bin/activate
    pip install -e python-keystoneclient
    deactivate
    tox -e py27

We should fix this before it gets released and breaks our gate. :)

Changed in ironic:
assignee: nobody → Jim Rollenhagen (jim-rollenhagen)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/117314
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=1b7bd6a6925ace525abdcefd1558013d60f58b10
Submitter: Jenkins
Branch: master

commit 1b7bd6a6925ace525abdcefd1558013d60f58b10
Author: Jim Rollenhagen <email address hidden>
Date: Wed Aug 27 17:51:15 2014 +0000

    Fix unit tests with keystoneclient master

    This patch in python-keystoneclient breaks unit tests in Ironic:
    https://review.openstack.org/#/c/113712/

    If admin_user is not passed to keystoneclient, an exception is
    raised.

    This patch overrides config for admin_user in Ironic's unit tests
    to get around this behavior.

    Closes-Bug: 1362280
    Change-Id: I3a21e7c1b3a87ebee5a0e81f805f50919ef6a6d5

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: juno-3 → 2014.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.