File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 55
66securedrop_test_vars = testutils .securedrop_test_vars
77testinfra_hosts = [securedrop_test_vars .monitor_hostname ]
8+ python_version = securedrop_test_vars .python_version
89
910
1011def test_ossec_connectivity (host ):
@@ -20,6 +21,19 @@ def test_ossec_connectivity(host):
2021 c = host .check_output ("/var/ossec/bin/list_agents -a" )
2122 assert c == desired_output
2223
24+ def test_service_start_style (host ):
25+ """
26+ Ensures to check that the service starts via sysv scrip in Xenial, and
27+ uses the systemd service in Focal.
28+ """
29+ if python_version == "3.8" :
30+ value = "/etc/systemd/system/ossec.service"
31+ else :
32+ value = "/etc/init.d/ossec"
33+ with host .sudo ():
34+ c = host .check_output ("systemctl status ossec" )
35+ assert value in c
36+
2337
2438# Permissions don't match between Ansible and OSSEC deb packages postinst.
2539@pytest .mark .xfail
You can’t perform that action at this time.
0 commit comments