Skip to content

Commit

Permalink
Switch back to notebook endpoint, print logs
Browse files Browse the repository at this point in the history
  • Loading branch information
dafeliton committed Feb 29, 2024
1 parent 21c02a0 commit 8b091bb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions images/datascience-notebook/test/test_start_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
@pytest.mark.parametrize(
"env,expected_server",
[
#(["DOCKER_STACKS_JUPYTER_CMD=notebook"], "notebook"), DEBUG TEST
(["DOCKER_STACKS_JUPYTER_CMD=lab"], "lab"),
(["DOCKER_STACKS_JUPYTER_CMD=notebook"], "notebook"),
#(["DOCKER_STACKS_JUPYTER_CMD=lab"], "lab"),
],
)
def test_start_notebook(container, http_client, env, expected_server):
Expand All @@ -24,9 +24,9 @@ def test_start_notebook(container, http_client, env, expected_server):
environment=env,
command=["start-notebook.py"],
)
resp = http_client.get("http://localhost:8888")
logs = c.logs(stdout=True).decode("utf-8")
LOGGER.debug(logs)
resp = http_client.get("http://localhost:8888/tree")
assert resp.status_code == 200, "Server is not listening"
assert(f"Executing the command: start-notebook.py"), "start-notebook.py was not called"
assert (
Expand Down Expand Up @@ -77,6 +77,7 @@ def test_jupyter_lab_exists(container, http_client, expected_server):
f"Executing: jupyter {expected_server}" in logs
), f"Not the expected command (jupyter {expected_server}) was launched"

@pytest.mark.skip("redundant test")
@pytest.mark.parametrize(
"expected_server",
[
Expand All @@ -102,7 +103,7 @@ def test_jupyter_notebook_exists(container, http_client, expected_server):
@pytest.mark.parametrize(
"expected_server",
[
("notebook"),
("lab"),
],
)
def test_server_extensions_start(container, http_client, expected_server):
Expand Down

0 comments on commit 8b091bb

Please sign in to comment.