diff --git a/tests/data/sinfo.txt b/tests/data/sinfo.txt
index 4dcb4ae..37d0b25 100644
--- a/tests/data/sinfo.txt
+++ b/tests/data/sinfo.txt
@@ -1,10 +1,10 @@
-N/A Devel nazare001 idle 0/20/0/20 128000 (null)
-N/A GPU-short budbud001 mixed 20/20/0/40 184000 gpu:t4:2,mps:t4:2000
-N/A A40-short budbud002 allocated 40/0/0/40 184000 gpu:a40:2,mps:a40:20
-N/A AMD-short cloudbreak001 drained 0/0/32/32 128000 (null)
-N/A lowp budbud003 down~ 0/0/40/40 128000 gpu:p100:2
-N/A lowp budbud004 drained~ 0/0/20/20 128000 gpu:k80:4
-N/A lowp budbud005 idle~ 0/20/0/20 192000 gpu:p100:1
+cluster Devel nazare001 idle 0/20/0/20 128000 (null)
+cluster GPU-short budbud001 mixed 20/20/0/40 184000 gpu:t4:2,mps:t4:2000
+cluster A40-short budbud002 allocated 40/0/0/40 184000 gpu:a40:2,mps:a40:20
+cluster AMD-short cloudbreak001 drained 0/0/32/32 128000 (null)
+cluster lowp budbud003 down~ 0/0/40/40 128000 gpu:p100:2
+cluster lowp budbud004 drained~ 0/0/20/20 128000 gpu:k80:4
+cluster lowp budbud005 idle~ 0/20/0/20 192000 gpu:p100:1
nautilus standard cnode001 completing 0/96/0/96 384000 (null)
nautilus bigmem cnode002 planned 0/96/0/96 768000 (null)
nautilus gpu gnode1 mixed 4/92/0/96 768000 gpu:A100:1(S:0-1)
diff --git a/tests/test_form.py b/tests/test_form.py
index 99b8895..65aa099 100644
--- a/tests/test_form.py
+++ b/tests/test_form.py
@@ -12,7 +12,7 @@ from pytest import fixture
DATA = Path(__file__).parent / 'data'
SINFO = sinfo_from_file(DATA / 'sinfo.txt')
-SLURM_SINGLE_CLUSTER = {'N/A': SINFO.pop('N/A')}
+SLURM_SINGLE_CLUSTER = {'cluster': SINFO.pop('cluster')}
SLURM_MULTI_CLUSTER = SINFO
@@ -81,7 +81,7 @@ def test_options_attrs(mock_cluster):
# Multi cluster configuration (default)
sinfo = options['sinfo']
- assert 'N/A' not in sinfo
+ assert 'cluster' not in sinfo
assert 'nautilus' in sinfo
assert 'waves' in sinfo
@@ -99,11 +99,11 @@ def test_options_attrs_single_cluster(mock_single_cluster):
# Single cluster configuration
sinfo = options['sinfo']
- assert 'N/A' in sinfo
+ assert 'cluster' in sinfo
assert 'nautilus' not in sinfo
assert 'waves' not in sinfo
- node = sinfo['N/A']['Devel']['nazare001']
+ node = sinfo['cluster']['Devel']['nazare001']
assert node == 'nazare001'
assert node.cpu.idle == 20
@@ -218,32 +218,32 @@ def test_options_form_slurm_single_cluster(mock_single_cluster):
assert (
'
' in html
)
assert (
- '
'
+ '
'
in html
)
assert (
- '
'
+ '
'
in html
)
# Nodes (hidden by default)
assert (
'
' in html
)
assert (
- ''
+ ''
in html
)
assert (
- ''
+ ''
in html
)
diff --git a/tests/test_slurm.py b/tests/test_slurm.py
index 28e23f1..a4d8693 100644
--- a/tests/test_slurm.py
+++ b/tests/test_slurm.py
@@ -105,6 +105,7 @@ def test_slurm_sinfo_run(monkeypatch):
'--federation '
'--noheader '
'--responding '
+ '--cluster=all '
'--Format=Cluster,PartitionName,NodeHost,StateLong,CPUsState,Memory,Gres'
)
@@ -114,6 +115,7 @@ def test_slurm_sinfo_run(monkeypatch):
'--federation '
'--noheader '
'--responding '
+ '--cluster=all '
'--Format=Cluster,PartitionName,NodeHost,StateLong,CPUsState,Memory,Gres'
)
@@ -127,7 +129,7 @@ def test_slurm_sinfo_reader():
node = nodes[0]
- assert node.cluster == 'N/A'
+ assert node.cluster == 'cluster'
assert node.partition == 'Devel'
assert node.hostname == 'nazare001'
assert node.state == 'idle'
@@ -136,7 +138,7 @@ def test_slurm_sinfo_reader():
assert node.mem == 128
assert not node.gpu
- assert [node.cluster for node in nodes] == 7 * ['N/A'] + 12 * ['nautilus'] + 6 * ['waves']
+ assert [node.cluster for node in nodes] == 7 * ['cluster'] + 12 * ['nautilus'] + 6 * ['waves']
assert len([node for node in nodes if node.state in ('idle', 'mixed')]) == 10
@@ -172,7 +174,7 @@ def test_slurm_sinfo_filter(monkeypatch):
assert isinstance(clusters, dict)
assert len(clusters) == 3
- assert list(clusters) == ['N/A', 'nautilus', 'waves'] # __eq__ on cluster.name
+ assert list(clusters) == ['cluster', 'nautilus', 'waves'] # __eq__ on cluster.name
assert [len(partitions) for partitions in clusters.values()] == [2, 4, 2]
@@ -195,7 +197,7 @@ def test_slurm_sinfo_filter(monkeypatch):
# Get only `idle` nodes
clusters = sinfo_filter(resources, with_states=('idle'))
- assert list(clusters) == ['N/A', 'nautilus']
+ assert list(clusters) == ['cluster', 'nautilus']
assert [len(partitions) for partitions in clusters.values()] == [1, 3]
# Discard clusters without partition available