Add working directory field in options form

This commit is contained in:
Benoît Seignovert 2024-02-26 14:35:30 +01:00
parent 0273f449b8
commit c67e8742c8
Signed by: Benoît Seignovert
GPG key ID: F5D8895227D18A0B
8 changed files with 71 additions and 8 deletions

View file

@ -1,6 +1,6 @@
"""Test resources module."""
from glicid_spawner.resources import CPU, GPU_DEFAULTS, MEMORY, gpu_max_duration
from glicid_spawner.resources import CPU, GPU_DEFAULTS, MEMORY, get_folders, gpu_max_duration
def test_default_resources():
@ -22,3 +22,15 @@ def test_gpu_max_duration():
# Sorted by defaults order, then unknowns
assert list(gpu) == ['None', 'A100', 'T4', 'K80']
assert list(gpu.values()) == [24, 1, 3, 3]
def test_resources_workdir():
"""Test resources working directories."""
assert get_folders('john-doe') == [
'/home/john-doe',
'/scratch/nautilus/users/john-doe',
'/scratch/waves/users/john-doe',
'/scratch/nautilus/projects',
'/scratch/waves/projects',
'/LAB-DATA/',
]