run_tests.sh does not work if keystone is not installed

Bug #1123462 reported by Johannes Erdfelt
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Won't Fix
Wishlist
Unassigned

Bug Description

Attempting to run unit tests from a checked out tree with run_tests.sh fails with 38 errors similar to this:

======================================================================
ERROR: Failure: ImportError (No module named keystone.common)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/johannes/virtualenvs/keystone/lib/python2.6/site-packages/nose/loader.py", line 390, in loadTestsFromName
    addr.filename, addr.module)
  File "/home/johannes/virtualenvs/keystone/lib/python2.6/site-packages/nose/importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/home/johannes/virtualenvs/keystone/lib/python2.6/site-packages/nose/importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/johannes/openstack/keystone/trunk/tests/test_wsgi.py", line 19, in <module>
    from keystone.common import wsgi
ImportError: No module named keystone.common

It appears that the python path is not setup correctly when using run_tests.sh. This same workflow works in nova, glance and quantum.

Revision history for this message
Dolph Mathews (dolph) wrote :

Workaround, fake install it:

  $ python setup.py develop

Changed in keystone:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
marvel (marvelliu) wrote :

this problem has not been fixed yet...

Revision history for this message
Li Ma (nick-ma-z) wrote :

I guess it need to install python-keystoneclient package to run integration test.

Revision history for this message
David Stanek (dstanek) wrote :

Once https://review.openstack.org/#/c/103282/ merges I think this bug can be closed. The change makes run_tests.sh use tox under the hood instead of re-implementing tox behavior.

Revision history for this message
David Stanek (dstanek) wrote :

run_tests.sh was deleted in https://review.openstack.org/#/c/199343/

Changed in keystone:
status: Confirmed → Won't Fix
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.