@@ -127,6 +127,7 @@ def test_ssh_service(host, docker_image):
127127 assert ssh .is_enabled
128128
129129
130+ @all_images
130131def test_service_systemd_mask (host , docker_image ):
131132 name = "sshd" if docker_image == "rockylinux9" else "ssh"
132133 ssh = host .service (name )
@@ -137,6 +138,7 @@ def test_service_systemd_mask(host, docker_image):
137138 assert not ssh .is_masked
138139
139140
141+ @all_images
140142def test_service_systemd_ssh (host , docker_image ):
141143 name = "sshd" if docker_image == "rockylinux9" else "ssh"
142144 ssh = host .service (name )
@@ -146,22 +148,26 @@ def test_service_systemd_ssh(host, docker_image):
146148 assert ssh .is_running
147149
148150
151+ # service unit exists only in Rocky Linux 9
149152@pytest .mark .testinfra_hosts ("docker://rockylinux9" )
150153def test_service_systemd_root_mount (host ):
151154 root = host .service ("-.mount" ) # systemd unit for mounting /
152155 assert root .exists
153156 assert root .is_valid
154- assert root .is_enabled
155- assert root .is_running
157+ x = host .run ("systemctl is-enabled -- -.mount" )
158+ raise AssertionError (f"{ x .stdout } \n { x .stderr } " )
159+ # assert root.is_enabled
160+ # assert root.is_running
156161
157162
163+ # service unit exists only in Rocky Linux 9
158164@pytest .mark .testinfra_hosts ("docker://rockylinux9" )
159165def test_service_systemd_tmp_mount (host ):
160166 tmp = host .service ("tmp.mount" )
161167 assert tmp .exists
162168 assert tmp .is_valid
163- assert tmp .is_enabled
164- assert tmp .is_running
169+ assert not tmp .is_enabled
170+ assert not tmp .is_running
165171
166172
167173def test_salt (host ):
0 commit comments