do not expect to match the scheme://host:port/ part
api could be running behind a proxy such as the tls proxy run by devstack. In such cases the url will not be match the baseurl known to the client, as client will derive url from keystone catalogue. Change-Id: Ie665240b53df92b8e5ca509e998e95d859bd5282
This commit is contained in:
parent
565c253a30
commit
1664f1f0a4
|
@ -109,12 +109,12 @@ class BaseInfraOptimTest(test.BaseTestCase):
|
|||
def validate_self_link(self, resource, uuid, link):
|
||||
"""Check whether the given self link formatted correctly."""
|
||||
expected_link = "{base}/{pref}/{res}/{uuid}".format(
|
||||
base=self.client.base_url,
|
||||
base='https?://[^/]*',
|
||||
pref=self.client.URI_PREFIX,
|
||||
res=resource,
|
||||
uuid=uuid
|
||||
)
|
||||
self.assertEqual(expected_link, link)
|
||||
self.assertRegex(link, expected_link)
|
||||
|
||||
def assert_expected(self, expected, actual,
|
||||
keys=('created_at', 'updated_at', 'deleted_at')):
|
||||
|
|
Loading…
Reference in New Issue