tests: fix potential infinite wait in tests spinning up a container (#7153)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L
2023-10-12 13:57:29 +02:00
committed by GitHub
parent 6d1eef039e
commit abab635a01
7 changed files with 37 additions and 52 deletions

View File

@ -48,13 +48,8 @@ class TestProviderSAML(SeleniumTestCase):
"SP_METADATA_URL": metadata_url,
},
)
while True:
container.reload()
status = container.attrs.get("State", {}).get("Health", {}).get("Status")
if status == "healthy":
return container
self.logger.info("Container failed healthcheck")
sleep(1)
self.wait_for_container(container)
return container
@retry()
@apply_blueprint(