Open
Description
Follow-up from PR #1218
(reference comment: #1218 (comment)).
Implement a test that:
- Starts the notebook image (e.g. with podman run -p 8888:8888 ...).
- Waits for JupyterLab to be ready.
- Fetches /lab (or /lab?reset) and asserts HTTP 200.
- Optionally, inspects logs for JavaScript errors (look for "Uncaught" or "TypeError" in the browser console output).
Sample code (Python, using requests):
import os, subprocess, time, requests
def wait_jlab_ready(url, timeout=60):
for _ in range(timeout):
try:
r = requests.get(url)
if r.status_code == 200:
return True
except Exception:
pass
time.sleep(1)
raise RuntimeError("JupyterLab did not become ready")
def test_jlab_server_smoke():
# Start container in background (adapt as needed)
proc = subprocess.Popen([
"podman", "run", "--rm", "-p", "8888:8888", os.environ["IMG"]
])
try:
wait_jlab_ready("http://localhost:8888/lab")
# Optionally: fetch logs and check for JS errors
finally:
proc.terminate()
Owner: @jiridanek
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status