tests: show logs for containers on failed e2e tests

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-06-03 22:17:18 +02:00
parent 0eaabbc0f3
commit e9621bae06
3 changed files with 22 additions and 0 deletions

View File

@ -32,6 +32,7 @@ class TestProviderProxy(SeleniumTestCase):
def tearDown(self) -> None:
super().tearDown()
self.output_container_logs(self.proxy_container)
self.proxy_container.kill()
def get_container_specs(self) -> Optional[dict[str, Any]]:
@ -88,6 +89,16 @@ class TestProviderProxy(SeleniumTestCase):
self.proxy_container = self.start_proxy(outpost)
# Wait until outpost healthcheck succeeds
healthcheck_retries = 0
while healthcheck_retries < 50:
if len(outpost.state) > 0:
state = outpost.state[0]
if state.last_seen:
break
healthcheck_retries += 1
sleep(0.5)
self.driver.get("http://localhost:4180")
self.login()
sleep(1)