./run_tests.sh throws an error on keystone.test.functional.test_client.TestAdminClient

Bug #885364 reported by Justin Shepherd
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Undecided
Justin Shepherd

Bug Description

 ./run_tests.sh
--SNIP--
Starting the RAX-KEY extension
Starting the Legacy Authentication component
Service API listening on 0.0.0.0:5000
Admin API listening on 0.0.0.0:35357
Running tests...
Stopping the keystone server...
Traceback (most recent call last):
  File "run_tests.py", line 31, in <module>
    test_cls().run()
  File "~/Projects/git/keystone/keystone/test/__init__.py", line 107, in run
    (BASE_DIR, TEST_DIR))
  File "~/Projects/git/keystone/keystone/test/__init__.py", line 44, in execute
    raise RuntimeError(msg)
RuntimeError: Command unit2 discover -f -t ~/Projects/git/keystone -s ~/Projects/git/keystone/keystone/test did not succeed. Returned an exit code of 1.

STDOUT:

STDERR: ............................E
======================================================================
ERROR: test_admin_get_token_bad_auth (keystone.test.functional.test_client.TestAdminClient)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "~/Projects/git/keystone/keystone/test/functional/test_client.py", line 61, in test_admin_get_token_bad_auth
    with self.assertRaises(keystone.common.exception.ClientError):
TypeError: failUnlessRaises() takes at least 3 arguments (2 given)

----------------------------------------------------------------------
Ran 29 tests in 13.794s

FAILED (errors=1)

Revision history for this message
Justin Shepherd (jshepher) wrote :

There are actually 2 issues in test/functional/test_client.py:

======================================================================
ERROR: test_admin_get_token_bad_auth (keystone.test.functional.test_client.TestServiceClient)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/justinshepherd/Projects/git/keystone/keystone/test/functional/test_client.py", line 87, in test_admin_get_token_bad_auth
    with self.assertRaises(keystone.common.exception.ClientError):
TypeError: failUnlessRaises() takes at least 3 arguments (2 given)

----------------------------------------------------------------------
Ran 33 tests in 13.516s

FAILED (errors=1)

Changed in keystone:
status: New → In Progress
assignee: nobody → Justin Shepherd (jshepher)
Revision history for this message
Justin Shepherd (jshepher) wrote :
Revision history for this message
Dolph Mathews (dolph) wrote : Re: [Bug 885364] Re: ./run_tests.sh throws an error on keystone.test.functional.test_client.TestAdminClient

What version of Python are you seeing this exception on?

Revision history for this message
Justin Shepherd (jshepher) wrote :

$ uname -a
Darwin sideswipe 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386

$python -V
Python 2.6.1

Revision history for this message
Justin Shepherd (jshepher) wrote :

Looks like the with block works in python 2.7.2

However the proposed fix works for both versions.

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/1262
Committed: http://github.com/openstack/keystone/commit/68c0f1c4ab18608c0705593f38646e287b68171e
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit 68c0f1c4ab18608c0705593f38646e287b68171e
Author: Justin Shepherd <email address hidden>
Date: Wed Nov 2 13:38:56 2011 -0500

    bug 885364

    fixed 2 errors in self.assertRaises calls

    Change-Id: Ic31347348b6e4e5b769d2e09fe3a11f95642e824

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → essex-1
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: essex-1 → 2012.1
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.