mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Merge branch 'main' into conda-channels
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Systemd inside a Docker container, for CI only
|
||||
ARG BASE_IMAGE=ubuntu:20.04
|
||||
ARG BASE_IMAGE=ubuntu:22.04
|
||||
FROM $BASE_IMAGE
|
||||
|
||||
# DEBIAN_FRONTEND is set to avoid being asked for input and hang during build:
|
||||
@@ -29,8 +29,8 @@ RUN systemctl set-default multi-user.target
|
||||
STOPSIGNAL SIGRTMIN+3
|
||||
|
||||
# Uncomment these lines for a development install
|
||||
#ENV TLJH_BOOTSTRAP_DEV=yes
|
||||
#ENV TLJH_BOOTSTRAP_PIP_SPEC=/srv/src
|
||||
#ENV PATH=/opt/tljh/hub/bin:${PATH}
|
||||
# ENV TLJH_BOOTSTRAP_DEV=yes
|
||||
# ENV TLJH_BOOTSTRAP_PIP_SPEC=/srv/src
|
||||
# ENV PATH=/opt/tljh/hub/bin:${PATH}
|
||||
|
||||
CMD ["/bin/bash", "-c", "exec /lib/systemd/systemd --log-target=journal 3>&1"]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""
|
||||
Simplest plugin that exercises all the hooks defined in tljh/hooks.py.
|
||||
"""
|
||||
|
||||
from tljh.hooks import hookimpl
|
||||
|
||||
|
||||
@@ -16,7 +17,7 @@ def tljh_extra_user_conda_channels():
|
||||
|
||||
@hookimpl
|
||||
def tljh_extra_user_pip_packages():
|
||||
return ["django"]
|
||||
return ["simplejson"]
|
||||
|
||||
|
||||
@hookimpl
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
filelock
|
||||
pytest
|
||||
pytest-cov
|
||||
pytest-asyncio
|
||||
|
||||
@@ -9,6 +9,7 @@ FIXME: The last test stands out and could be part of the other tests, and the
|
||||
first two could be more like unit tests. Ideally, this file is
|
||||
significantly reduced.
|
||||
"""
|
||||
|
||||
import concurrent.futures
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
@@ -33,7 +33,7 @@ def test_hub_version():
|
||||
r = requests.get(HUB_URL + "/hub/api")
|
||||
r.raise_for_status()
|
||||
info = r.json()
|
||||
assert V("4") <= V(info["version"]) <= V("5")
|
||||
assert V("5.1") <= V(info["version"]) <= V("6")
|
||||
|
||||
|
||||
async def test_user_code_execute():
|
||||
@@ -59,9 +59,9 @@ async def test_user_code_execute():
|
||||
|
||||
async with User(username, HUB_URL, partial(login_dummy, password="")) as u:
|
||||
assert await u.login()
|
||||
await u.ensure_server_simulate(timeout=60, spawn_refresh_time=5)
|
||||
await u.start_kernel()
|
||||
await u.assert_code_output("5 * 4", "20", 5, 5)
|
||||
assert await u.ensure_server_simulate(timeout=60, spawn_refresh_time=5)
|
||||
assert await u.start_kernel()
|
||||
assert await u.assert_code_output("5 * 4", "20", 5, 5)
|
||||
|
||||
|
||||
async def test_user_server_started_with_custom_base_url():
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""tests for the proxy"""
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import ssl
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Test the plugin in integration-tests/plugins/simplest that makes use of all tljh
|
||||
recognized plugin hooks that are defined in tljh/hooks.py.
|
||||
"""
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
@@ -19,7 +20,7 @@ def test_tljh_extra_user_conda_packages():
|
||||
|
||||
|
||||
def test_tljh_extra_user_pip_packages():
|
||||
subprocess.check_call([f"{USER_ENV_PREFIX}/bin/python3", "-c", "import django"])
|
||||
subprocess.check_call([f"{USER_ENV_PREFIX}/bin/python3", "-c", "import simplejson"])
|
||||
|
||||
|
||||
def test_tljh_extra_hub_pip_packages():
|
||||
|
||||
Reference in New Issue
Block a user