Skip to content

Commit f0ef7e3

Browse files
committed
Use simpler API to get health of container
1 parent dcd1c45 commit f0ef7e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/utils/tracked_container.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ def get_logs(self) -> str:
5757

5858
def get_health(self) -> str:
5959
assert self.container is not None
60-
inspect_results = self.docker_client.api.inspect_container(self.container.name)
61-
return inspect_results["State"]["Health"]["Status"] # type: ignore
60+
self.container.reload()
61+
return self.container.health # type: ignore
6262

6363
def exec_cmd(self, cmd: str, **kwargs: Any) -> str:
6464
assert self.container is not None

0 commit comments

Comments
 (0)