Enforce workspace reset on new lab
This commit is contained in:
parent
1a7f5f102f
commit
825c9ea2c3
2 changed files with 3 additions and 3 deletions
|
@ -26,7 +26,7 @@ class GlicidSpawner(SlurmSpawner):
|
||||||
@default('default_url')
|
@default('default_url')
|
||||||
def _default_url_default(self) -> str:
|
def _default_url_default(self) -> str:
|
||||||
"""The URL the single-user server should start in."""
|
"""The URL the single-user server should start in."""
|
||||||
return '/lab/tree' + self.user_options.get('workdir', '/home/{username}')
|
return '/lab/tree' + self.user_options.get('workdir', '/home/{username}') + '?reset'
|
||||||
|
|
||||||
batchspawner_singleuser_cmd = Unicode(
|
batchspawner_singleuser_cmd = Unicode(
|
||||||
'glicid-spawner-singleuser',
|
'glicid-spawner-singleuser',
|
||||||
|
|
|
@ -23,7 +23,7 @@ def test_spawner_config():
|
||||||
|
|
||||||
assert spawner.disable_user_config
|
assert spawner.disable_user_config
|
||||||
assert spawner.notebook_dir == '/'
|
assert spawner.notebook_dir == '/'
|
||||||
assert spawner.default_url == '/lab/tree/home/{username}'
|
assert spawner.default_url == '/lab/tree/home/{username}?reset'
|
||||||
assert spawner.req_job_name == 'jupyterhub_glicid'
|
assert spawner.req_job_name == 'jupyterhub_glicid'
|
||||||
assert spawner.req_qos == 'short'
|
assert spawner.req_qos == 'short'
|
||||||
assert spawner.progress_rate == 10
|
assert spawner.progress_rate == 10
|
||||||
|
@ -58,7 +58,7 @@ def test_spawner_options_form(monkeypatch):
|
||||||
|
|
||||||
spawner = GlicidSpawner(user_options={'workdir': '/LAB-DATA'})
|
spawner = GlicidSpawner(user_options={'workdir': '/LAB-DATA'})
|
||||||
|
|
||||||
assert spawner.default_url == '/lab/tree/LAB-DATA'
|
assert spawner.default_url == '/lab/tree/LAB-DATA?reset'
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
|
|
Loading…
Add table
Reference in a new issue