File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ def test_service_systemd_mask(host, docker_image):
138138 assert not ssh .is_masked
139139
140140
141+ @all_images
141142def test_service_systemd_ssh (host , docker_image ):
142143 name = "sshd" if docker_image == "rockylinux9" else "ssh"
143144 ssh = host .service (name )
@@ -147,22 +148,29 @@ def test_service_systemd_ssh(host, docker_image):
147148 assert ssh .is_running
148149
149150
151+ # service unit exists only in Rocky Linux 9
150152@pytest .mark .testinfra_hosts ("docker://rockylinux9" )
151153def test_service_systemd_root_mount (host ):
152154 root = host .service ("-.mount" ) # systemd unit for mounting /
153155 assert root .exists
154156 assert root .is_valid
155- assert root .is_enabled
156- assert root .is_running
157+ assert not root .is_enabled
158+ a = host .run ("systemctl status -- -.mount" )
159+ b = host .run ("systemctl is-enabled -- -.mount" )
160+ raise AssertionError (
161+ f"{ a .stdout } \n { a .stderr } \n { a .rc } \n { b .stdout } \n { b .stderr } \n { b .rc } "
162+ )
163+ # assert root.is_running
157164
158165
166+ # service unit exists only in Rocky Linux 9
159167@pytest .mark .testinfra_hosts ("docker://rockylinux9" )
160168def test_service_systemd_tmp_mount (host ):
161169 tmp = host .service ("tmp.mount" )
162170 assert tmp .exists
163171 assert tmp .is_valid
164- assert tmp .is_enabled
165- assert tmp .is_running
172+ assert not tmp .is_enabled
173+ assert not tmp .is_running
166174
167175
168176def test_salt (host ):
You can’t perform that action at this time.
0 commit comments