Skip to content

Commit 983cccb

Browse files
author
Dean Troyer
committed
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
1 parent 1b9cf82 commit 983cccb

1 file changed

Lines changed: 17 additions & 6 deletions

File tree

  • openstackclient/tests/functional/identity/v2

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

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import os
1414

1515
from tempest.lib.common.utils import data_utils
16+
from tempest.lib import exceptions as tempest_exceptions
1617

1718
from openstackclient.tests.functional import base
1819

@@ -49,12 +50,22 @@ def setUpClass(cls):
4950
# create dummy project
5051
cls.project_name = data_utils.rand_name('TestProject')
5152
cls.project_description = data_utils.rand_name('description')
52-
cls.openstack(
53-
'project create '
54-
'--description %(description)s '
55-
'--enable '
56-
'%(name)s' % {'description': cls.project_description,
57-
'name': cls.project_name})
53+
try:
54+
cls.openstack(
55+
'project create '
56+
'--description %(description)s '
57+
'--enable '
58+
'%(name)s' % {
59+
'description': cls.project_description,
60+
'name': cls.project_name,
61+
}
62+
)
63+
except tempest_exceptions.CommandFailed:
64+
# Good chance this is due to Identity v2 admin not being enabled
65+
# TODO(dtroyer): Actually determine if Identity v2 admin is
66+
# enabled in the target cloud. Tuens out OSC
67+
# doesn't make this easy as it should (yet).
68+
raise cls.skipException('No Identity v2 admin endpoint?')
5869

5970
@classmethod
6071
def tearDownClass(cls):

0 commit comments

Comments
 (0)