mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-14 21:42:57 +00:00
Better tests directory structure (#2231)
This commit is contained in:
10
tests/utils/get_container_health.py
Normal file
10
tests/utils/get_container_health.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) Jupyter Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
import docker
|
||||
from docker.models.containers import Container
|
||||
|
||||
|
||||
def get_health(container: Container) -> str:
|
||||
api_client = docker.APIClient()
|
||||
inspect_results = api_client.inspect_container(container.name)
|
||||
return inspect_results["State"]["Health"]["Status"] # type: ignore
|
Reference in New Issue
Block a user