Skip to content

Commit e8a81b3

Browse files
author
Vasileios Karakasis
authored
Merge pull request #1840 from ChristopherBignamini/sanity_jupyter_tests
[test] Sanity jupyter tests
2 parents 792fd3d + c4c0d77 commit e8a81b3

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

cscs-checks/tools/jupyter/jupyter_tests.py

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,35 @@
88

99

1010
@rfm.simple_test
11-
class JupyterHubSubmitTest(rfm.RunOnlyRegressionTest):
12-
def __init__(self):
13-
self.valid_systems = ['daint:jupyter_gpu', 'daint:jupyter_mc',
14-
'dom:jupyter_gpu', 'dom:jupyter_mc']
15-
self.valid_prog_environs = ['*']
16-
self.sourcesdir = None
17-
self.executable = 'hostname'
18-
self.time_limit = '1m'
19-
self.max_pending_time = '7m'
11+
class jupyterhub_submit_test(rfm.RunOnlyRegressionTest):
12+
valid_systems = ['daint:jupyter_gpu', 'daint:jupyter_mc',
13+
'dom:jupyter_gpu', 'dom:jupyter_mc']
14+
valid_prog_environs = ['builtin']
15+
sourcesdir = None
16+
executable = 'hostname'
17+
time_limit = '1m'
18+
max_pending_time = '7m'
19+
tags = {'production', 'post-maintenance', 'health'}
20+
maintainers = ['RS', 'TR']
21+
22+
@rfm.run_before('sanity')
23+
def set_sanity_check(self):
2024
self.sanity_patterns = sn.assert_found(r'nid\d+', self.stdout)
21-
self.tags = {'production', 'maintenance'}
22-
self.maintainers = ['RS', 'TR']
25+
26+
27+
@rfm.simple_test
28+
class jupyterhub_api_test(rfm.RunOnlyRegressionTest):
29+
descr = 'Check JupyterHub server status and version'
30+
valid_systems = ['daint:jupyter_gpu', 'daint:jupyter_mc',
31+
'dom:jupyter_gpu', 'dom:jupyter_mc']
32+
valid_prog_environs = ['builtin']
33+
sourcesdir = None
34+
executable = 'curl https://jupyter.cscs.ch/hub/api/'
35+
time_limit = '30s'
36+
tags = {'health'}
37+
maintainers = ['CB', 'TR']
38+
39+
@rfm.run_before('sanity')
40+
def set_sanity_check(self):
41+
self.sanity_patterns = sn.assert_found(r'{"version": "1.3.0"}',
42+
self.stdout)

0 commit comments

Comments
 (0)