Merge "Accept custom registered endpoints"

This commit is contained in:
Zuul 2020-01-28 17:29:23 +00:00 committed by Gerrit Code Review
commit 802ff0e1c4
4 changed files with 10 additions and 11 deletions

View File

@ -34,13 +34,12 @@ class CrossdomainTest(base.BaseObjectTest):
def setUp(self):
super(CrossdomainTest, self).setUp()
# Turning http://.../v1/foobar into http://.../
self.account_client.skip_path()
@decorators.idempotent_id('d1b8b031-b622-4010-82f9-ff78a9e915c7')
@utils.requires_ext(extension='crossdomain', service='object')
def test_get_crossdomain_policy(self):
resp, body = self.account_client.get("crossdomain.xml", {})
url = self.account_client._get_base_version_url() + "crossdomain.xml"
resp, body = self.account_client.raw_request(url, "GET")
self.account_client._error_checker(resp, body)
body = body.decode()
self.assertTrue(body.startswith(self.xml_start) and

View File

@ -22,13 +22,12 @@ class HealthcheckTest(base.BaseObjectTest):
def setUp(self):
super(HealthcheckTest, self).setUp()
# Turning http://.../v1/foobar into http://.../
self.account_client.skip_path()
@decorators.idempotent_id('db5723b1-f25c-49a9-bfeb-7b5640caf337')
def test_get_healthcheck(self):
resp, _ = self.account_client.get("healthcheck", {})
url = self.account_client._get_base_version_url() + "healthcheck"
resp, body = self.account_client.raw_request(url, "GET")
self.account_client._error_checker(resp, body)
# The target of the request is not any Swift resource. Therefore, the
# existence of response header is checked without a custom matcher.

View File

@ -21,9 +21,10 @@ from tempest.lib.common import rest_client
class CapabilitiesClient(rest_client.RestClient):
def list_capabilities(self):
self.skip_path()
try:
resp, body = self.get('info')
url = self._get_base_version_url() + 'info'
resp, body = self.raw_request(url, 'GET')
self._error_checker(resp, body)
finally:
self.reset_path()
body = json.loads(body)

View File

@ -43,7 +43,7 @@ class TestCapabilitiesClient(base.BaseServiceTest):
}
self.check_service_client_function(
self.client.list_capabilities,
'tempest.lib.common.rest_client.RestClient.get',
'tempest.lib.common.rest_client.RestClient.raw_request',
resp,
bytes_body)