Skip to content

Commit c2b8142

Browse files
Fix test for SystemdService.is_masked
1 parent dca7b05 commit c2b8142

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/test_modules.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,14 @@ def test_ssh_service(host, docker_image):
127127
assert ssh.is_enabled
128128

129129

130-
def test_service_systemd_mask(host):
131-
ssh = host.service("ssh")
130+
@all_images
131+
def test_service_systemd_mask(host, docker_image):
132+
name = "sshd" if docker_image == "rockylinux9" else "ssh"
133+
ssh = host.service(name)
132134
assert not ssh.is_masked
133-
host.run("systemctl mask ssh")
135+
host.run(f"systemctl mask -- {name}")
134136
assert ssh.is_masked
135-
host.run("systemctl unmask ssh")
137+
host.run(f"systemctl unmask -- {name}")
136138
assert not ssh.is_masked
137139

138140

0 commit comments

Comments
 (0)