Skip to content

Commit

Permalink
Check healthcheck in all jupyter applications (#1854)
Browse files Browse the repository at this point in the history
* Check healthcheck in all jupyter applications

* Fix

* Remove JUPYTERHUB_API_TOKEN healthcheck test
  • Loading branch information
mathbunnyru authored Jan 4, 2023
1 parent c9ac681 commit a905ff6
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/base-notebook/test_healthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,30 @@

import logging
import time
from typing import Optional

import pytest # type: ignore

from tests.conftest import TrackedContainer, get_health

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(
tty=True,
environment=env,
)
# sleeping some time to let the server start
time.sleep(15)
Expand Down

0 comments on commit a905ff6

Please sign in to comment.