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
This commit is contained in:
Dean Troyer 2017-05-02 10:29:59 -05:00
parent 1b9cf82b42
commit 983cccb662

View File

@ -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):