Skip to content

Commit

Permalink
is_container_ready should return False if container was not found
Browse files Browse the repository at this point in the history
Currently it raises an exception and as a result wait_for_services fails
immediately if it runs before the containers are running
  • Loading branch information
ygalblum-stratoscale committed Mar 25, 2019
1 parent dfe0b2a commit 85dfd55
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docker_test_tools/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ def is_container_ready(self, name):
:param str name: container name as it appears in the docker compose file.
"""
status_output = self.inspect_container(name)['State']
try:
status_output = self.inspect_container(name)['State']
except RuntimeError:
return False

if 'Health' in status_output:
is_ready = status_output['Health']['Status'] == "healthy"
Expand Down

0 comments on commit 85dfd55

Please sign in to comment.