Skip to content

Commit

Permalink
Override OS_AUTH_URL when running functional tests
Browse files Browse the repository at this point in the history
* Fixes bug 985671

Change-Id: Ie4f4c13846de727647abe168aeb193a93f03e0bf
  • Loading branch information
bcwaldon committed Apr 23, 2012
1 parent ca84ec7 commit df28738
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions glance/tests/functional/test_bin_glance.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def setUp(self):
# spin up won't have keystone support, so we need to switch to the
# NoAuth strategy.
os.environ['OS_AUTH_STRATEGY'] = 'noauth'
os.environ['OS_AUTH_URL'] = ''

def _assertStartsWith(self, str, prefix):
msg = 'expected "%s" to start with "%s"' % (str, prefix)
Expand Down
1 change: 1 addition & 0 deletions glance/tests/functional/v1/test_bin_glance_cache_manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def setUp(self):
# spin up won't have keystone support, so we need to switch to the
# NoAuth strategy.
os.environ['OS_AUTH_STRATEGY'] = 'noauth'
os.environ['OS_AUTH_URL'] = ''

def add_image(self, name):
"""
Expand Down
10 changes: 10 additions & 0 deletions glance/tests/functional/v1/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ class TestMiscellaneous(functional.FunctionalTest):

"""Some random tests for various bugs and stuff"""

def setUp(self):
super(TestMiscellaneous, self).setUp()

# NOTE(sirp): This is needed in case we are running the tests under an
# environment in which OS_AUTH_STRATEGY=keystone. The test server we
# spin up won't have keystone support, so we need to switch to the
# NoAuth strategy.
os.environ['OS_AUTH_STRATEGY'] = 'noauth'
os.environ['OS_AUTH_URL'] = ''

def test_api_response_when_image_deleted_from_filesystem(self):
"""
A test for LP bug #781410 -- glance should fail more gracefully
Expand Down

0 comments on commit df28738

Please sign in to comment.