Skip to content

Commit

Permalink
tests(slurm_ops): update integration tests to use new configuration m…
Browse files Browse the repository at this point in the history
…anager interface

Signed-off-by: Jason C. Nucciarone <[email protected]>
  • Loading branch information
NucciTheBoss committed Sep 20, 2024
1 parent c8b11e8 commit c363fbb
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/integration/slurm_ops/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ def test_install(slurmctld: SlurmctldManager, etc_path: Path) -> None:
assert key == slurmctld.munge.key.get()


"sz+VRDLFlr3o"


@pytest.mark.order(2)
def test_rotate_key(slurmctld: SlurmctldManager) -> None:
"""Test that the munge key can be rotated."""
Expand All @@ -39,13 +36,13 @@ def test_rotate_key(slurmctld: SlurmctldManager) -> None:


@pytest.mark.order(3)
def test_slurm_config(slurmctld: SlurmctldManager, etc_path: Path) -> None:
def test_slurm_config(slurmctld: SlurmctldManager) -> None:
"""Test that the slurm config can be changed."""
with slurmctld.config() as config:
with slurmctld.config.edit() as config:
config.slurmctld_host = [slurmctld.hostname]
config.cluster_name = "test-cluster"

for line in (etc_path / "slurm" / "slurm.conf").read_text().splitlines():
for line in str(slurmctld.config.load()).splitlines():
entry = line.split("=")
if len(entry) != 2:
continue
Expand All @@ -58,7 +55,7 @@ def test_slurm_config(slurmctld: SlurmctldManager, etc_path: Path) -> None:

@pytest.mark.order(4)
def test_enable_service(slurmctld: SlurmctldManager) -> None:
"""Test that the slurmctl daemon can be enabled."""
"""Test that the slurmctld daemon can be enabled."""
slurmctld.service.enable()
assert slurmctld.service.active()

Expand Down

0 comments on commit c363fbb

Please sign in to comment.