Fix dashboard policy tests.

The dashboard policyd  override tests assume the deloyment is http
and non-ha. This is not a safe assumption so use the existing code
to generate the correct domain listing url.
This commit is contained in:
Liam Young
2022-09-12 14:20:41 +00:00
parent acf30b3a8a
commit 6246326729

View File

@@ -530,7 +530,7 @@ class OpenStackDashboardPolicydTests(policyd.BasePolicydSpecialization,
})}
# url associated with rule above that will return HTTP 403
url = "http://{}/horizon/identity/domains"
url = "{}/identity/domains"
@classmethod
def setUpClass(cls, application_name=None):
@@ -565,7 +565,7 @@ class OpenStackDashboardPolicydTests(policyd.BasePolicydSpecialization,
self.get_horizon_url(), domain, username, password,
cafile=self.cacert)
# now attempt to get the domains page
_url = self.url.format(zaza_model.get_unit_public_address(unit))
_url = self.url.format(self.get_horizon_url())
logging.info("URL is {}".format(_url))
result = client.get(_url)
if result.status_code == 403: