mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
hub env: bump to require latest major version, less pinned now
This commit is contained in:
@@ -26,7 +26,7 @@ Enabling the authenticator
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sudo tljh-config set auth.type dummyauthenticator.DummyAuthenticator
|
sudo tljh-config set auth.type dummy
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ async def test_user_code_execute():
|
|||||||
hub_url = 'http://localhost'
|
hub_url = 'http://localhost'
|
||||||
username = secrets.token_hex(8)
|
username = secrets.token_hex(8)
|
||||||
|
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'auth.type', 'dummyauthenticator.DummyAuthenticator')).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'auth.type', 'dummy')).wait()
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'reload')).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'reload')).wait()
|
||||||
|
|
||||||
async with User(username, hub_url, partial(login_dummy, password='')) as u:
|
async with User(username, hub_url, partial(login_dummy, password='')) as u:
|
||||||
@@ -58,7 +58,7 @@ async def test_user_server_started_with_custom_base_url():
|
|||||||
hub_url = f"http://localhost{base_url}"
|
hub_url = f"http://localhost{base_url}"
|
||||||
username = secrets.token_hex(8)
|
username = secrets.token_hex(8)
|
||||||
|
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'auth.type', 'dummyauthenticator.DummyAuthenticator')).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'auth.type', 'dummy')).wait()
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'base_url', base_url)).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'base_url', base_url)).wait()
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'reload')).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'reload')).wait()
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ async def test_user_admin_add():
|
|||||||
hub_url = 'http://localhost'
|
hub_url = 'http://localhost'
|
||||||
username = secrets.token_hex(8)
|
username = secrets.token_hex(8)
|
||||||
|
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'auth.type', 'dummyauthenticator.DummyAuthenticator')).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'auth.type', 'dummy')).wait()
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'add-item', 'users.admin', username)).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'add-item', 'users.admin', username)).wait()
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'reload')).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'reload')).wait()
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ async def test_user_admin_remove():
|
|||||||
hub_url = 'http://localhost'
|
hub_url = 'http://localhost'
|
||||||
username = secrets.token_hex(8)
|
username = secrets.token_hex(8)
|
||||||
|
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'auth.type', 'dummyauthenticator.DummyAuthenticator')).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'auth.type', 'dummy')).wait()
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'add-item', 'users.admin', username)).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'add-item', 'users.admin', username)).wait()
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'reload')).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'reload')).wait()
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ async def test_long_username():
|
|||||||
hub_url = 'http://localhost'
|
hub_url = 'http://localhost'
|
||||||
username = secrets.token_hex(32)
|
username = secrets.token_hex(32)
|
||||||
|
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'auth.type', 'dummyauthenticator.DummyAuthenticator')).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'auth.type', 'dummy')).wait()
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'reload')).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'reload')).wait()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -183,7 +183,7 @@ async def test_user_group_adding():
|
|||||||
# Create the group we want to add the user to
|
# Create the group we want to add the user to
|
||||||
system('groupadd somegroup')
|
system('groupadd somegroup')
|
||||||
|
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'auth.type', 'dummyauthenticator.DummyAuthenticator')).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'auth.type', 'dummy')).wait()
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'add-item', 'users.extra_user_groups.somegroup', username)).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'add-item', 'users.extra_user_groups.somegroup', username)).wait()
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'reload')).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'reload')).wait()
|
||||||
|
|
||||||
@@ -223,7 +223,7 @@ async def test_idle_server_culled():
|
|||||||
hub_url = 'http://localhost'
|
hub_url = 'http://localhost'
|
||||||
username = secrets.token_hex(8)
|
username = secrets.token_hex(8)
|
||||||
|
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'auth.type', 'dummyauthenticator.DummyAuthenticator')).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'auth.type', 'dummy')).wait()
|
||||||
# Check every 10s for idle servers to cull
|
# Check every 10s for idle servers to cull
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'services.cull.every', "10")).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'services.cull.every', "10")).wait()
|
||||||
# Apart from servers, also cull users
|
# Apart from servers, also cull users
|
||||||
@@ -269,7 +269,7 @@ async def test_active_server_not_culled():
|
|||||||
hub_url = 'http://localhost'
|
hub_url = 'http://localhost'
|
||||||
username = secrets.token_hex(8)
|
username = secrets.token_hex(8)
|
||||||
|
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'auth.type', 'dummyauthenticator.DummyAuthenticator')).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'auth.type', 'dummy')).wait()
|
||||||
# Check every 10s for idle servers to cull
|
# Check every 10s for idle servers to cull
|
||||||
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'services.cull.every', "10")).wait()
|
assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'services.cull.every', "10")).wait()
|
||||||
# Apart from servers, also cull users
|
# Apart from servers, also cull users
|
||||||
|
|||||||
@@ -148,13 +148,13 @@ def test_auth_dummy():
|
|||||||
"""
|
"""
|
||||||
c = apply_mock_config({
|
c = apply_mock_config({
|
||||||
'auth': {
|
'auth': {
|
||||||
'type': 'dummyauthenticator.DummyAuthenticator',
|
'type': 'dummy',
|
||||||
'DummyAuthenticator': {
|
'DummyAuthenticator': {
|
||||||
'password': 'test'
|
'password': 'test'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
assert c.JupyterHub.authenticator_class == 'dummyauthenticator.DummyAuthenticator'
|
assert c.JupyterHub.authenticator_class == 'dummy'
|
||||||
assert c.DummyAuthenticator.password == 'test'
|
assert c.DummyAuthenticator.password == 'test'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -125,22 +125,21 @@ def ensure_jupyterhub_package(prefix):
|
|||||||
'build-essential'
|
'build-essential'
|
||||||
])
|
])
|
||||||
conda.ensure_pip_packages(prefix, [
|
conda.ensure_pip_packages(prefix, [
|
||||||
'pycurl==7.43.*'
|
'pycurl==7.*'
|
||||||
])
|
])
|
||||||
|
|
||||||
conda.ensure_pip_packages(
|
conda.ensure_pip_packages(
|
||||||
prefix,
|
prefix,
|
||||||
[
|
[
|
||||||
"jupyterhub==1.4.0",
|
"jupyterhub==1.*",
|
||||||
"jupyterhub-dummyauthenticator==0.3.1",
|
"jupyterhub-systemdspawner==0.15.*",
|
||||||
"jupyterhub-systemdspawner==0.15",
|
"jupyterhub-firstuseauthenticator==0.14.*",
|
||||||
"jupyterhub-firstuseauthenticator==0.14.1",
|
"jupyterhub-nativeauthenticator==1.*",
|
||||||
"jupyterhub-nativeauthenticator==0.0.7",
|
"jupyterhub-ldapauthenticator==1.*",
|
||||||
"jupyterhub-ldapauthenticator==1.3.0",
|
"jupyterhub-tmpauthenticator==0.6.*",
|
||||||
"jupyterhub-tmpauthenticator==0.6",
|
"oauthenticator==14.*",
|
||||||
"oauthenticator==0.10.0",
|
"jupyterhub-idle-culler==1.*",
|
||||||
"jupyterhub-idle-culler==1.0",
|
"chardet==4.*",
|
||||||
"chardet==3.0.4",
|
|
||||||
"git+https://github.com/yuvipanda/jupyterhub-configurator@317759e17c8e48de1b1352b836dac2a230536dba"
|
"git+https://github.com/yuvipanda/jupyterhub-configurator@317759e17c8e48de1b1352b836dac2a230536dba"
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user