From 1664f1f0a48cf30aaf725f4d8af5477542d2f0e3 Mon Sep 17 00:00:00 2001 From: Sumit Jamgade Date: Fri, 16 Nov 2018 11:46:22 +0100 Subject: [PATCH] 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 --- watcher_tempest_plugin/tests/api/admin/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/watcher_tempest_plugin/tests/api/admin/base.py b/watcher_tempest_plugin/tests/api/admin/base.py index 9b17b1c..71c72b1 100644 --- a/watcher_tempest_plugin/tests/api/admin/base.py +++ b/watcher_tempest_plugin/tests/api/admin/base.py @@ -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')):