From d780e9e91fae608a8e810dc070b67299fd0b324c Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Wed, 25 Jan 2017 15:25:28 -0600 Subject: Fix Identity functional tests to not require OS_AUTH_URL The Identity functional tests had an assumption that OS_AUTH_URL would always be present, but when running the functional tests and only setting OS_CLOUD (using clouds.yaml for creds) this fell down. Change-Id: Ie589d301f866b06d9f8be8deeb953e03bc01cf09 --- openstackclient/tests/functional/identity/v3/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openstackclient/tests/functional/identity/v3') diff --git a/openstackclient/tests/functional/identity/v3/common.py b/openstackclient/tests/functional/identity/v3/common.py index 3b6fc27b..eabf96d5 100644 --- a/openstackclient/tests/functional/identity/v3/common.py +++ b/openstackclient/tests/functional/identity/v3/common.py @@ -56,8 +56,8 @@ class IdentityTests(base.TestCase): # prepare v3 env os.environ['OS_IDENTITY_API_VERSION'] = '3' auth_url = os.environ.get('OS_AUTH_URL') - auth_url = auth_url.replace('v2.0', 'v3') - os.environ['OS_AUTH_URL'] = auth_url + if auth_url: + os.environ['OS_AUTH_URL'] = auth_url.replace('v2.0', 'v3') # create dummy domain cls.domain_name = data_utils.rand_name('TestDomain') -- cgit v1.2.1