mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-13 13:02:56 +00:00
Check healthcheck in all jupyter applications (#1854)
* Check healthcheck in all jupyter applications * Fix * Remove JUPYTERHUB_API_TOKEN healthcheck test
This commit is contained in:
@@ -3,15 +3,30 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
import pytest # type: ignore
|
||||||
|
|
||||||
from tests.conftest import TrackedContainer, get_health
|
from tests.conftest import TrackedContainer, get_health
|
||||||
|
|
||||||
LOGGER = logging.getLogger(__name__)
|
LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def test_health(container: TrackedContainer) -> None:
|
@pytest.mark.parametrize(
|
||||||
|
"env",
|
||||||
|
[
|
||||||
|
None,
|
||||||
|
["DOCKER_STACKS_JUPYTER_CMD=lab"],
|
||||||
|
["RESTARTABLE=yes"],
|
||||||
|
["DOCKER_STACKS_JUPYTER_CMD=notebook"],
|
||||||
|
["DOCKER_STACKS_JUPYTER_CMD=server"],
|
||||||
|
["DOCKER_STACKS_JUPYTER_CMD=nbclassic"],
|
||||||
|
],
|
||||||
|
)
|
||||||
|
def test_health(container: TrackedContainer, env: Optional[list[str]]) -> None:
|
||||||
running_container = container.run_detached(
|
running_container = container.run_detached(
|
||||||
tty=True,
|
tty=True,
|
||||||
|
environment=env,
|
||||||
)
|
)
|
||||||
# sleeping some time to let the server start
|
# sleeping some time to let the server start
|
||||||
time.sleep(15)
|
time.sleep(15)
|
||||||
|
Reference in New Issue
Block a user