Remove/update v2 catalog endpoint tests
With the removal of the v2.0 APIs in Queens, we can remove the test for v2 get_catalog_endpoint_disabled as well as the test that skips it for templated backend. This also updates the test fixture endpoints to specify the v3 url. Change-Id: Ic9521276cc8ac91c2a9b7553c34bea5690f03fa7
This commit is contained in:
parent
bd452fb9d9
commit
ef4e7d11f5
|
@ -537,24 +537,6 @@ class CatalogTests(object):
|
|||
endpoints = self.catalog_api.list_endpoints()
|
||||
self.assertEqual(expected_ids, set(e['id'] for e in endpoints))
|
||||
|
||||
def test_get_catalog_endpoint_disabled(self):
|
||||
"""Get back only enabled endpoints when get the v2 catalog."""
|
||||
service_ref, enabled_endpoint_ref, dummy_disabled_endpoint_ref = (
|
||||
self._create_endpoints())
|
||||
|
||||
user_id = uuid.uuid4().hex
|
||||
project_id = uuid.uuid4().hex
|
||||
catalog = self.catalog_api.get_catalog(user_id, project_id)
|
||||
|
||||
exp_entry = {
|
||||
'id': enabled_endpoint_ref['id'],
|
||||
'name': service_ref['name'],
|
||||
'publicURL': enabled_endpoint_ref['url'],
|
||||
}
|
||||
|
||||
region = enabled_endpoint_ref['region_id']
|
||||
self.assertEqual(exp_entry, catalog[region][service_ref['type']])
|
||||
|
||||
def test_get_v3_catalog_endpoint_disabled(self):
|
||||
"""Get back only enabled endpoints when get the v3 catalog."""
|
||||
enabled_endpoint_ref = self._create_endpoints()[1]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# config for templated.Catalog, using camelCase because I don't want to do
|
||||
# translations for keystone compat
|
||||
catalog.RegionOne.identity.publicURL = http://localhost:$(public_port)s/v2.0
|
||||
catalog.RegionOne.identity.adminURL = http://localhost:$(admin_port)s/v2.0
|
||||
catalog.RegionOne.identity.internalURL = http://localhost:$(admin_port)s/v2.0
|
||||
catalog.RegionOne.identity.publicURL = http://localhost:$(public_port)s/v3
|
||||
catalog.RegionOne.identity.adminURL = http://localhost:$(admin_port)s/v3
|
||||
catalog.RegionOne.identity.internalURL = http://localhost:$(admin_port)s/v3
|
||||
catalog.RegionOne.identity.name = 'Identity Service'
|
||||
catalog.RegionOne.identity.id = 1
|
||||
|
||||
|
|
|
@ -40,9 +40,9 @@ class TestTemplatedCatalog(unit.TestCase, catalog_tests.CatalogTests):
|
|||
'id': '2'
|
||||
},
|
||||
'identity': {
|
||||
'adminURL': 'http://localhost:35357/v2.0',
|
||||
'publicURL': 'http://localhost:5000/v2.0',
|
||||
'internalURL': 'http://localhost:35357/v2.0',
|
||||
'adminURL': 'http://localhost:35357/v3',
|
||||
'publicURL': 'http://localhost:5000/v3',
|
||||
'internalURL': 'http://localhost:35357/v3',
|
||||
'name': "'Identity Service'",
|
||||
'id': '1'
|
||||
}
|
||||
|
@ -81,10 +81,6 @@ class TestTemplatedCatalog(unit.TestCase, catalog_tests.CatalogTests):
|
|||
catalog_ref = self.catalog_api.get_catalog('foo', 'bar')
|
||||
self.assertEqual(1, len(catalog_ref['RegionOne']))
|
||||
|
||||
def test_get_catalog_endpoint_disabled(self):
|
||||
self.skip_test_overrides(
|
||||
"Templated backend doesn't have disabled endpoints")
|
||||
|
||||
def test_get_v3_catalog_endpoint_disabled(self):
|
||||
self.skip_test_overrides(
|
||||
"Templated backend doesn't have disabled endpoints")
|
||||
|
@ -119,13 +115,13 @@ class TestTemplatedCatalog(unit.TestCase, catalog_tests.CatalogTests):
|
|||
{'endpoints': [
|
||||
{'interface': 'admin',
|
||||
'region': 'RegionOne',
|
||||
'url': 'http://localhost:35357/v2.0'},
|
||||
'url': 'http://localhost:35357/v3'},
|
||||
{'interface': 'public',
|
||||
'region': 'RegionOne',
|
||||
'url': 'http://localhost:5000/v2.0'},
|
||||
'url': 'http://localhost:5000/v3'},
|
||||
{'interface': 'internal',
|
||||
'region': 'RegionOne',
|
||||
'url': 'http://localhost:35357/v2.0'}],
|
||||
'url': 'http://localhost:35357/v3'}],
|
||||
'type': 'identity',
|
||||
'name': "'Identity Service'",
|
||||
'id': '1'}]
|
||||
|
@ -145,13 +141,13 @@ class TestTemplatedCatalog(unit.TestCase, catalog_tests.CatalogTests):
|
|||
{'endpoints': [
|
||||
{'interface': 'admin',
|
||||
'region': 'RegionOne',
|
||||
'url': 'http://localhost:35357/v2.0'},
|
||||
'url': 'http://localhost:35357/v3'},
|
||||
{'interface': 'public',
|
||||
'region': 'RegionOne',
|
||||
'url': 'http://localhost:5000/v2.0'},
|
||||
'url': 'http://localhost:5000/v3'},
|
||||
{'interface': 'internal',
|
||||
'region': 'RegionOne',
|
||||
'url': 'http://localhost:35357/v2.0'}],
|
||||
'url': 'http://localhost:35357/v3'}],
|
||||
'type': 'identity',
|
||||
'name': "'Identity Service'",
|
||||
'id': '1'}]
|
||||
|
@ -253,8 +249,8 @@ class TestTemplatedCatalog(unit.TestCase, catalog_tests.CatalogTests):
|
|||
self.skip_test_overrides(BROKEN_WRITE_FUNCTIONALITY_MSG)
|
||||
|
||||
def test_list_endpoints(self):
|
||||
expected_urls = set(['http://localhost:$(public_port)s/v2.0',
|
||||
'http://localhost:$(admin_port)s/v2.0',
|
||||
expected_urls = set(['http://localhost:$(public_port)s/v3',
|
||||
'http://localhost:$(admin_port)s/v3',
|
||||
'http://localhost:8774/v1.1/$(tenant_id)s'])
|
||||
endpoints = self.catalog_api.list_endpoints()
|
||||
self.assertEqual(expected_urls, set(e['url'] for e in endpoints))
|
||||
|
|
Loading…
Reference in New Issue