Skip to content

Commit

Permalink
Remove clamav-daemon/clamav-clamonacc service from test
Browse files Browse the repository at this point in the history
This service does not exist when installing manually (i.e., not via
the system package manager).
  • Loading branch information
jsf9k committed Jan 14, 2025
1 parent 042b35f commit 4d9804c
Showing 1 changed file with 14 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,48 +30,20 @@ def test_clamscan_executable_present(host):

def test_services(host):
"""Test that the expected services were enabled or disabled as intended."""
distribution = host.system_info.distribution
if distribution in ["debian", "kali", "ubuntu"]:
services = [
{
"is_enabled": False,
"name": "clamav-daemon",
},
{
"is_enabled": True,
"name": "clamav-freshclam",
},
{
"is_enabled": True,
"name": "run-virus-scan.service",
},
{
"is_enabled": True,
"name": "run-virus-scan.timer",
},
]
elif distribution in ["fedora"]:
services = [
{
"is_enabled": False,
"name": "clamav-clamonacc",
},
{
"is_enabled": True,
"name": "clamav-freshclam",
},
{
"is_enabled": True,
"name": "run-virus-scan.service",
},
{
"is_enabled": True,
"name": "run-virus-scan.timer",
},
]
else:
# We don't support this distribution
assert False
services = [
{
"is_enabled": True,
"name": "clamav-freshclam",
},
{
"is_enabled": True,
"name": "run-virus-scan.service",
},
{
"is_enabled": True,
"name": "run-virus-scan.timer",
},
]

for service in services:
svc = host.service(service["name"])
Expand Down

0 comments on commit 4d9804c

Please sign in to comment.