Add username to sinfo command

This commit is contained in:
Benoît Seignovert 2024-02-14 13:18:21 +01:00
parent 1f4d8e28fa
commit e2e2318c6c
Signed by: Benoît Seignovert
GPG key ID: F5D8895227D18A0B
2 changed files with 19 additions and 7 deletions

View file

@ -53,10 +53,19 @@ def test_slurm_sinfo_run(monkeypatch):
'--federation '
'--noheader '
'--responding '
'--cluster=all '
'--Format=Cluster,PartitionName,NodeHost,StateLong,CPUsState,Memory,Gres'
)
assert _sinfo_run(username='john-doe') == (
'su - john-doe -c "'
'sinfo '
'--federation '
'--noheader '
'--responding '
'--Format=Cluster,PartitionName,NodeHost,StateLong,CPUsState,Memory,Gres'
'"'
)
def test_slurm_sinfo_reader():
"""Test SLURM SINFO reader."""