From f0ef7e30b22bdc45da5891a90451d8f9be71cda1 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Fri, 21 Mar 2025 10:11:19 +0000 Subject: [PATCH] Use simpler API to get health of container --- tests/utils/tracked_container.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/utils/tracked_container.py b/tests/utils/tracked_container.py index a912da5f..5ae1bbd0 100644 --- a/tests/utils/tracked_container.py +++ b/tests/utils/tracked_container.py @@ -57,8 +57,8 @@ class TrackedContainer: def get_health(self) -> str: assert self.container is not None - inspect_results = self.docker_client.api.inspect_container(self.container.name) - return inspect_results["State"]["Health"]["Status"] # type: ignore + self.container.reload() + return self.container.health # type: ignore def exec_cmd(self, cmd: str, **kwargs: Any) -> str: assert self.container is not None