testresources needs to be explicitly required for tests

Bug #1572202 reported by David Stanek
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Unassigned

Bug Description

I get the following traceback when trying to run tests from master:

    Failed to import test module: keystone.tests.unit.test_sql_upgrade
    Traceback (most recent call last):
      File "/opt/stack/keystone.old/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
        module = self._get_module_from_name(name)
      File "/opt/stack/keystone.old/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
        __import__(name)
      File "keystone/tests/unit/test_sql_upgrade.py", line 42, in <module>
        from oslo_db.sqlalchemy import test_base
      File "/opt/stack/keystone.old/.tox/py27/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/test_base.py", line 17, in <module>
        import testresources
    ImportError: No module named testresources
    The test run didn't actually run any tests

Explicitly requiring testresources for tests fixes the issue.

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/307878

Changed in keystone:
assignee: nobody → David Stanek (dstanek)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to keystone (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/308086

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by David Stanek (<email address hidden>) on branch: master
Review: https://review.openstack.org/307878
Reason: This really isn't the correct fix.

Changed in keystone:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to keystone (master)

Reviewed: https://review.openstack.org/308086
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=a5968655e8d36e9f126e7c22990cba9ec44e6b3c
Submitter: Jenkins
Branch: master

commit a5968655e8d36e9f126e7c22990cba9ec44e6b3c
Author: David Stanek <email address hidden>
Date: Wed Apr 20 00:05:58 2016 +0000

    Bump the required tox version to 2.3.1

    Other projects are already starting to make this change and it should
    help with some of the strange issues we commonly get asked in IRC. When
    those issues come up the first step is always update to the latest tox
    and pip, so we might as well make that recommendation more formal.

    Change-Id: Ic320881797b99747357ac14c6f84636e5070523d
    Related-Bug: #1572202

Revision history for this message
Steve Martinelli (stevemar) wrote :

Automatically unassigning due to inactivity.

Changed in keystone:
assignee: David Stanek (dstanek) → nobody
status: In Progress → Triaged
Revision history for this message
Steve Martinelli (stevemar) wrote :

bumping tox and global requirements fixed this issue

Changed in keystone:
status: Triaged → Fix Released
milestone: none → newton-1
Revision history for this message
Mike Bayer (zzzeek) wrote :

just a note, this is about to hit again when you hit oslo.db 4.34, I'm going to try to get it fixed: https://bugs.launchpad.net/oslo.db/+bug/1756352

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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