Skip to content

Commit 73498ca

Browse files
F
1 parent 87cd7e5 commit 73498ca

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

test/test_modules.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ def test_service_systemd_mask(host, docker_image):
137137
assert not ssh.is_masked
138138

139139

140+
@all_images
140141
def test_service_systemd_ssh(host, docker_image):
141142
name = "sshd" if docker_image == "rockylinux9" else "ssh"
142143
ssh = host.service(name)
@@ -146,22 +147,29 @@ def test_service_systemd_ssh(host, docker_image):
146147
assert ssh.is_running
147148

148149

150+
# service unit exists only in Rocky Linux 9
149151
@pytest.mark.testinfra_hosts("docker://rockylinux9")
150152
def test_service_systemd_root_mount(host):
151153
root = host.service("-.mount") # systemd unit for mounting /
152154
assert root.exists
153155
assert root.is_valid
154-
assert root.is_enabled
155-
assert root.is_running
156+
a = host.run("systemctl status -- -.mount")
157+
b = host.run("systemctl is-enabled -- -.mount")
158+
raise AssertionError(
159+
f"{a.stdout}\n{a.stderr}\n{a.rc}\n{b.stdout}\n{b.stderr}\n{b.rc}"
160+
)
161+
# assert not root.is_enabled
162+
# assert root.is_running
156163

157164

165+
# service unit exists only in Rocky Linux 9
158166
@pytest.mark.testinfra_hosts("docker://rockylinux9")
159167
def test_service_systemd_tmp_mount(host):
160168
tmp = host.service("tmp.mount")
161169
assert tmp.exists
162170
assert tmp.is_valid
163-
assert tmp.is_enabled
164-
assert tmp.is_running
171+
assert not tmp.is_enabled
172+
assert not tmp.is_running
165173

166174

167175
def test_salt(host):

0 commit comments

Comments
 (0)