Update keystone v3 admin URL in UT

We no longer use port 35357 for keystone v3 API admin operation
and it is recommended to use port 5000.
This commit updates keystone catalog for keystone v3 API.
It also replace keystone v2 URL with v3 one.
Note that keystone v2 data is kept as-is.

Change-Id: Ia152d602b80ae418e0020b3ba30a11016a83da6a
This commit is contained in:
Akihiro Motoki 2018-08-14 02:50:47 +09:00
parent 9ec34b0b5d
commit c6611abe16
4 changed files with 7 additions and 7 deletions

View File

@ -65,7 +65,7 @@ def generate_test_data(pki=False, service_providers=False,
'id': uuid.uuid4().hex,
'endpoints': [
{
'url': 'http://admin.%s:35357/v3' % endpoint,
'url': 'http://admin.%s:5000/v3' % endpoint,
'region': 'RegionOne',
'interface': 'admin',
'id': uuid.uuid4().hex,

View File

@ -89,9 +89,9 @@ SERVICE_CATALOG = [
"endpoints_links": [],
"endpoints": [
{"region": "RegionOne",
"adminURL": "http://admin.keystone.example.com:35357/v2.0",
"internalURL": "http://int.keystone.example.com:5000/v2.0",
"publicURL": "http://public.keystone.example.com:5000/v2.0"}]},
"adminURL": "http://admin.keystone.example.com:5000/v3",
"internalURL": "http://int.keystone.example.com:5000/v3",
"publicURL": "http://public.keystone.example.com:5000/v3"}]},
{"type": "object-store",
"name": "swift",
"endpoints_links": [],

View File

@ -285,7 +285,7 @@ class ApiHelperTests(test.TestCase):
self.request.user.services_region = "bogus_value"
url = api_base.url_for(self.request, 'identity',
endpoint_type='adminURL')
self.assertEqual('http://admin.keystone.example.com:35357/v2.0', url)
self.assertEqual('http://admin.keystone.example.com:5000/v3', url)
self.request.user.services_region = "bogus_value"
with self.assertRaises(exceptions.ServiceCatalogException):

View File

@ -84,9 +84,9 @@ class ServiceAPITests(test.APIMockTestCase):
self.assertEqual(u"identity (native backend)", six.text_type(service))
self.assertEqual(identity_data["endpoints"][0]["region"],
service.region)
self.assertEqual("http://int.keystone.example.com:5000/v2.0",
self.assertEqual("http://int.keystone.example.com:5000/v3",
service.url)
self.assertEqual("http://public.keystone.example.com:5000/v2.0",
self.assertEqual("http://public.keystone.example.com:5000/v3",
service.public_url)
self.assertEqual("int.keystone.example.com", service.host)