Add spawner config tests
This commit is contained in:
parent
2333ccd168
commit
f1f6526daa
2 changed files with 44 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
"""GLiCID spawner module."""
|
||||
|
||||
from batchspawner import SlurmSpawner
|
||||
from traitlets import Unicode
|
||||
from traitlets import Unicode, default
|
||||
|
||||
from .form import options_form, options_from_form
|
||||
|
||||
|
@ -9,11 +9,15 @@ from .form import options_form, options_from_form
|
|||
class GlicidSpawner(SlurmSpawner):
|
||||
"""Glicid SLURM Spawner."""
|
||||
|
||||
batchspawner_singleuser_cmd = Unicode(
|
||||
glicid_singleuser_cmd = Unicode(
|
||||
'glicid-spawner-singleuser',
|
||||
help='Glicid spawner singleuser command.',
|
||||
).tag(config=True)
|
||||
|
||||
@default('batchspawner_singleuser_cmd')
|
||||
def _batchspawner_singleuser_cmd_default(self):
|
||||
return self.glicid_singleuser_cmd
|
||||
|
||||
def options_form(self) -> str:
|
||||
"""JupyterHub rendered form template."""
|
||||
return options_form(self.user.name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue