Disable testing of the v2.0 identity API

The v2.0 identity API is being removed in the Queens release, but in
order to do so we need to exclude/remove some v2.0 tempests tests
from being run. Since tempest is branchless we should keep the tests
around until Queens is EOL and then we can go through and clean up
all the v2.0 cruft from tempest.

Change-Id: I5d6bd5e1bfe2d5c999ced9ff92de846e50cc2c12
This commit is contained in:
Lance Bragstad 2017-09-22 18:58:53 +00:00
parent c91d445614
commit 1fbad23824
4 changed files with 15 additions and 22 deletions

View File

@ -0,0 +1,7 @@
---
upgrade:
- |
As of the Queens release, tempest no longer tests the identity v2.0 API
because the majority of the v2.0 API have been removed from the identity
project. Once the Queens release reaches end-of-life, we can remove the
v2.0 tempest tests and clean up v2.0 testing cruft.

View File

@ -196,10 +196,6 @@ def _get_api_versions(os, service):
def verify_keystone_api_versions(os, update):
# Check keystone api versions
versions = _get_api_versions(os, 'keystone')
if (CONF.identity_feature_enabled.api_v2 !=
contains_version('v2.', versions)):
print_and_or_update('api_v2', 'identity-feature-enabled',
not CONF.identity_feature_enabled.api_v2, update)
if (CONF.identity_feature_enabled.api_v3 !=
contains_version('v3.', versions)):
print_and_or_update('api_v3', 'identity-feature-enabled',

View File

@ -207,8 +207,14 @@ IdentityFeatureGroup = [
help='Does the identity service have delegation and '
'impersonation enabled'),
cfg.BoolOpt('api_v2',
default=True,
help='Is the v2 identity API enabled'),
default=False,
help='Is the v2 identity API enabled',
deprecated_for_removal=True,
deprecated_reason='The identity v2.0 API was removed in the '
'Queens release. Tests that exercise the '
'v2.0 API will be removed from tempest in '
'the v22.0.0 release. They are kept only to '
'test stable branches.'),
cfg.BoolOpt('api_v2_admin',
default=True,
help="Is the v2 identity admin API available? This setting "

View File

@ -175,22 +175,6 @@ class TestDiscovery(base.TestCase):
'identity-feature-enabled',
False, True)
@mock.patch('tempest.lib.common.http.ClosingHttp.request')
def test_verify_keystone_api_versions_no_v2(self, mock_request):
self.useFixture(fixtures.MockPatchObject(
verify_tempest_config, '_get_unversioned_endpoint',
return_value='http://fake_endpoint:5000'))
fake_resp = {'versions': {'values': [{'id': 'v3.0'}]}}
fake_resp = json.dumps(fake_resp)
mock_request.return_value = (None, fake_resp)
fake_os = mock.MagicMock()
with mock.patch.object(verify_tempest_config,
'print_and_or_update') as print_mock:
verify_tempest_config.verify_keystone_api_versions(fake_os, True)
print_mock.assert_called_once_with('api_v2',
'identity-feature-enabled',
False, True)
@mock.patch('tempest.lib.common.http.ClosingHttp.request')
def test_verify_cinder_api_versions_no_v3(self, mock_request):
self.useFixture(fixtures.MockPatchObject(