Return the endpoint_override from EndpointData

Setting up an Adapter with an endpoint_override, calling
get_endpoint_data() on that adapter, and accessing the `url` @property
of the resulting EndpointData now regurgitates the endpoint_override
initially set on the Adapter.

Change-Id: I1033c97a7b0e19a75fa0d3c5682cf18b75918514
Closes-Bug: #1707993
This commit is contained in:
Eric Fried 2017-08-08 17:41:30 -05:00 committed by Monty Taylor
parent 38e4a675a1
commit 8a963de05a
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
2 changed files with 3 additions and 0 deletions

View File

@ -245,6 +245,7 @@ class BaseIdentityPlugin(plugin.BaseAuthPlugin):
# For now, just use any information the use has
# provided.
endpoint_data = discover.EndpointData(
service_url=endpoint_override,
catalog_url=endpoint_override,
interface=interface,
region_name=region_name,

View File

@ -1398,6 +1398,8 @@ class CatalogHackTests(utils.TestCase):
max_version=(2, discover.LATEST))
self.assertTrue(common_m.called)
self.assertEqual(self.OTHER_URL, data.service_url)
self.assertEqual(self.OTHER_URL, data.catalog_url)
self.assertEqual(self.OTHER_URL, data.url)
self.assertEqual((2, 1), data.min_microversion)
self.assertEqual((2, 35), data.max_microversion)