fix: cleanup api tests
- delete a service, created in a test to execute a patch - assign timeouts from conf file, rather than use defaults - add Error message, to make sure we log the amount of time spent by the test awaiting service state transitions. Change-Id: Ib3bbc4480ad8afa386cd46ba40d65b0781917af5
This commit is contained in:
parent
7082481797
commit
72a0d26d01
@ -304,6 +304,8 @@ class TestServicePatch(base.TestBase):
|
||||
request_body=add_duplicate_domain)
|
||||
self.assertEqual(resp.status_code, 400)
|
||||
|
||||
self.client.delete_service(location=service_url)
|
||||
|
||||
def tearDown(self):
|
||||
self.client.delete_service(location=self.service_url)
|
||||
if self.test_config.generate_flavors:
|
||||
|
@ -369,7 +369,9 @@ class TestServiceActions(base.TestBase):
|
||||
self.client.wait_for_service_status(
|
||||
location=self.service_url,
|
||||
status='deployed',
|
||||
abort_on_status='failed')
|
||||
abort_on_status='failed',
|
||||
retry_interval=self.test_config.status_check_retry_interval,
|
||||
retry_timeout=self.test_config.status_check_retry_timeout)
|
||||
|
||||
@attrib.attr('smoke')
|
||||
def test_delete_service(self):
|
||||
|
@ -371,7 +371,9 @@ class PoppyClient(client.AutoMarshallingHTTPClient):
|
||||
current_time = int(time.time())
|
||||
if current_time > stop_time:
|
||||
assert False, ('Timed out waiting for service status change'
|
||||
' to {0}').format(status)
|
||||
' to {0} after '
|
||||
'waiting {1} seconds').format(status,
|
||||
retry_timeout)
|
||||
|
||||
def wait_for_service_delete(self, location,
|
||||
abort_on_status=None,
|
||||
@ -399,4 +401,6 @@ class PoppyClient(client.AutoMarshallingHTTPClient):
|
||||
|
||||
current_time = int(time.time())
|
||||
if current_time > stop_time:
|
||||
assert False, ('Timed out waiting for service to be deleted')
|
||||
assert False, ('Timed out waiting for service '
|
||||
'to be deleted, after '
|
||||
'waiting {0} seconds'.format(retry_timeout))
|
||||
|
Loading…
Reference in New Issue
Block a user