Skip to content

Commit d780e9e

Browse files
author
Dean Troyer
committed
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
1 parent b69b539 commit d780e9e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

openstackclient/tests/functional/identity/v2/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ def setUpClass(cls):
4444
# prepare v2 env
4545
os.environ['OS_IDENTITY_API_VERSION'] = '2.0'
4646
auth_url = os.environ.get('OS_AUTH_URL')
47-
auth_url = auth_url.replace('v3', 'v2.0')
48-
os.environ['OS_AUTH_URL'] = auth_url
47+
if auth_url:
48+
os.environ['OS_AUTH_URL'] = auth_url.replace('v3', 'v2.0')
4949

5050
# create dummy project
5151
cls.project_name = data_utils.rand_name('TestProject')

openstackclient/tests/functional/identity/v3/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ def setUpClass(cls):
5656
# prepare v3 env
5757
os.environ['OS_IDENTITY_API_VERSION'] = '3'
5858
auth_url = os.environ.get('OS_AUTH_URL')
59-
auth_url = auth_url.replace('v2.0', 'v3')
60-
os.environ['OS_AUTH_URL'] = auth_url
59+
if auth_url:
60+
os.environ['OS_AUTH_URL'] = auth_url.replace('v2.0', 'v3')
6161

6262
# create dummy domain
6363
cls.domain_name = data_utils.rand_name('TestDomain')

0 commit comments

Comments
 (0)