Add explicit PYTHONUSERBASE path to micromamba endpoint

This commit is contained in:
Benoît Seignovert 2024-03-26 08:05:00 +01:00
parent 69015d5062
commit d2c0631956
Signed by: Benoît Seignovert
GPG key ID: F5D8895227D18A0B
4 changed files with 17 additions and 5 deletions

View file

@ -27,8 +27,9 @@ def test_spawner_config():
assert 'bin/glicid-spawner-singleuser' in cmd
assert 'bin/jupyterhub-singleuser' in cmd
assert spawner.req_mamba_root_prefix == '/micromamba/operator'
assert spawner.req_mamba_exe == '/micromamba/operator/bin/micromamba'
assert spawner.req_mamba_root_prefix == '/micromamba/operator'
assert spawner.req_mamba_user_base == '/micromamba/$USER'
assert spawner.req_job_name == 'jupyterhub_glicid'
assert spawner.req_qos == 'short'
@ -70,8 +71,12 @@ def test_spawner_batch_script(monkeypatch):
assert 'export MAMBA_EXE=/micromamba/operator/bin/micromamba;' in script
assert 'export MAMBA_ROOT_PREFIX=/micromamba/operator;' in script
assert 'export PYTHONUSERBASE=/micromamba/$USER;' in script
assert 'micromamba activate /micromamba/john-doe/envs/foo;' in script
assert 'micromamba activate /micromamba/john-doe/envs/foo;' in script
assert 'export JUPYTER_PATH=/micromamba/john-doe/envs/foo/share/jupyter;' in script
assert re.search(r'.*/bin/glicid-spawner-singleuser .*/bin/jupyterhub-singleuser', script)