diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2017-05-02 10:29:59 -0500 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2017-05-02 10:32:21 -0500 |
| commit | 983cccb6628bcd8dc310a867e35709e0b410c9d6 (patch) | |
| tree | 19dcfb9224def4bc1c86adf4aaade6cd3233c813 /openstackclient | |
| parent | 1b9cf82b42c4236aca5c5a7f7e26eb36c4ab7ac9 (diff) | |
| download | python-openstackclient-983cccb6628bcd8dc310a867e35709e0b410c9d6.tar.gz | |
Functional tests: Identity v2 and DevStack
DevStack master (as of 01May2017) no longer sets up an Identity v2
admin endpoint, so we need to skip those tests going forward and cover
them via a specific leagacy job. This does the detect-and-skip.
Change-Id: Ib9ab32b6bc84ec7d13508094ad6f83995d8d7bc1
Diffstat (limited to 'openstackclient')
| -rw-r--r-- | openstackclient/tests/functional/identity/v2/common.py | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/openstackclient/tests/functional/identity/v2/common.py b/openstackclient/tests/functional/identity/v2/common.py index 4f3e1801..69ef728b 100644 --- a/openstackclient/tests/functional/identity/v2/common.py +++ b/openstackclient/tests/functional/identity/v2/common.py @@ -13,6 +13,7 @@ import os from tempest.lib.common.utils import data_utils +from tempest.lib import exceptions as tempest_exceptions from openstackclient.tests.functional import base @@ -49,12 +50,22 @@ class IdentityTests(base.TestCase): # create dummy project cls.project_name = data_utils.rand_name('TestProject') cls.project_description = data_utils.rand_name('description') - cls.openstack( - 'project create ' - '--description %(description)s ' - '--enable ' - '%(name)s' % {'description': cls.project_description, - 'name': cls.project_name}) + try: + cls.openstack( + 'project create ' + '--description %(description)s ' + '--enable ' + '%(name)s' % { + 'description': cls.project_description, + 'name': cls.project_name, + } + ) + except tempest_exceptions.CommandFailed: + # Good chance this is due to Identity v2 admin not being enabled + # TODO(dtroyer): Actually determine if Identity v2 admin is + # enabled in the target cloud. Tuens out OSC + # doesn't make this easy as it should (yet). + raise cls.skipException('No Identity v2 admin endpoint?') @classmethod def tearDownClass(cls): |
