]> git.openstreetmap.org Git - chef.git/commitdiff
Fix spamassassin tests for Debian
authorTom Hughes <tom@compton.nu>
Tue, 20 Jun 2023 20:09:39 +0000 (20:09 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 20 Jun 2023 20:10:07 +0000 (21:10 +0100)
test/integration/mail/serverspec/spamassassin_spec.rb
test/integration/spamassassin/serverspec/spamassassin_spec.rb

index 1276f140cf5db32ad15e1e94f01e91a9e92701c0..d96394f9e0df31ec930d0593efb5dee77f47e114 100644 (file)
@@ -3,11 +3,17 @@ require "serverspec"
 # Required by serverspec
 set :backend, :exec
 
+service_name = if os[:family] == "debian"
+                 "spamd"
+               else
+                 "spamassassin"
+               end
+
 describe package("spamassassin") do
   it { should be_installed }
 end
 
-describe service("spamassassin") do
+describe service(service_name) do
   it { should be_enabled }
   it { should be_running }
 end
index 1276f140cf5db32ad15e1e94f01e91a9e92701c0..d96394f9e0df31ec930d0593efb5dee77f47e114 100644 (file)
@@ -3,11 +3,17 @@ require "serverspec"
 # Required by serverspec
 set :backend, :exec
 
+service_name = if os[:family] == "debian"
+                 "spamd"
+               else
+                 "spamassassin"
+               end
+
 describe package("spamassassin") do
   it { should be_installed }
 end
 
-describe service("spamassassin") do
+describe service(service_name) do
   it { should be_enabled }
   it { should be_running }
 end