Merge "Disable testing of the v2.0 identity API"

changes/02/433602/49
Zuul 6 years ago committed by Gerrit Code Review
commit c0a96b3132

@ -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.

@ -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',

@ -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 "

@ -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(

Loading…
Cancel
Save