From 990135e17978403d59c5a5bbb7aacda89149c46b Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Tue, 19 Oct 2021 11:56:16 +0200 Subject: [PATCH] hub env: bump to require latest major version, less pinned now --- docs/howto/auth/dummy.rst | 2 +- integration-tests/test_hub.py | 16 ++++++++-------- tests/test_configurer.py | 4 ++-- tljh/installer.py | 21 ++++++++++----------- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/docs/howto/auth/dummy.rst b/docs/howto/auth/dummy.rst index 49f736b..5a92d89 100644 --- a/docs/howto/auth/dummy.rst +++ b/docs/howto/auth/dummy.rst @@ -26,7 +26,7 @@ Enabling the authenticator .. code-block:: bash - sudo tljh-config set auth.type dummyauthenticator.DummyAuthenticator + sudo tljh-config set auth.type dummy .. code-block:: bash diff --git a/integration-tests/test_hub.py b/integration-tests/test_hub.py index b89e17e..687d4a9 100644 --- a/integration-tests/test_hub.py +++ b/integration-tests/test_hub.py @@ -34,7 +34,7 @@ async def test_user_code_execute(): hub_url = 'http://localhost' 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() 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}" 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, 'reload')).wait() @@ -81,7 +81,7 @@ async def test_user_admin_add(): hub_url = 'http://localhost' 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, 'reload')).wait() @@ -111,7 +111,7 @@ async def test_user_admin_remove(): hub_url = 'http://localhost' 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, 'reload')).wait() @@ -147,7 +147,7 @@ async def test_long_username(): hub_url = 'http://localhost' 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() try: @@ -183,7 +183,7 @@ async def test_user_group_adding(): # Create the group we want to add the user to 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, 'reload')).wait() @@ -223,7 +223,7 @@ async def test_idle_server_culled(): hub_url = 'http://localhost' 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 assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'services.cull.every', "10")).wait() # Apart from servers, also cull users @@ -269,7 +269,7 @@ async def test_active_server_not_culled(): hub_url = 'http://localhost' 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 assert 0 == await (await asyncio.create_subprocess_exec(*TLJH_CONFIG_PATH, 'set', 'services.cull.every', "10")).wait() # Apart from servers, also cull users diff --git a/tests/test_configurer.py b/tests/test_configurer.py index 1e57607..6a1637e 100644 --- a/tests/test_configurer.py +++ b/tests/test_configurer.py @@ -148,13 +148,13 @@ def test_auth_dummy(): """ c = apply_mock_config({ 'auth': { - 'type': 'dummyauthenticator.DummyAuthenticator', + 'type': 'dummy', 'DummyAuthenticator': { 'password': 'test' } } }) - assert c.JupyterHub.authenticator_class == 'dummyauthenticator.DummyAuthenticator' + assert c.JupyterHub.authenticator_class == 'dummy' assert c.DummyAuthenticator.password == 'test' diff --git a/tljh/installer.py b/tljh/installer.py index 05b4ce4..05b0ef7 100644 --- a/tljh/installer.py +++ b/tljh/installer.py @@ -125,22 +125,21 @@ def ensure_jupyterhub_package(prefix): 'build-essential' ]) conda.ensure_pip_packages(prefix, [ - 'pycurl==7.43.*' + 'pycurl==7.*' ]) conda.ensure_pip_packages( prefix, [ - "jupyterhub==1.4.0", - "jupyterhub-dummyauthenticator==0.3.1", - "jupyterhub-systemdspawner==0.15", - "jupyterhub-firstuseauthenticator==0.14.1", - "jupyterhub-nativeauthenticator==0.0.7", - "jupyterhub-ldapauthenticator==1.3.0", - "jupyterhub-tmpauthenticator==0.6", - "oauthenticator==0.10.0", - "jupyterhub-idle-culler==1.0", - "chardet==3.0.4", + "jupyterhub==1.*", + "jupyterhub-systemdspawner==0.15.*", + "jupyterhub-firstuseauthenticator==0.14.*", + "jupyterhub-nativeauthenticator==1.*", + "jupyterhub-ldapauthenticator==1.*", + "jupyterhub-tmpauthenticator==0.6.*", + "oauthenticator==14.*", + "jupyterhub-idle-culler==1.*", + "chardet==4.*", "git+https://github.com/yuvipanda/jupyterhub-configurator@317759e17c8e48de1b1352b836dac2a230536dba" ], )