]> git.openstreetmap.org Git - chef.git/blobdiff - test/integration/spamassassin/serverspec/spamassassin_spec.rb
donate: redirect to support.osm.org
[chef.git] / test / integration / spamassassin / serverspec / spamassassin_spec.rb
index 2f2e643cffcf8550d1f808be0e1be32761f11576..d96394f9e0df31ec930d0593efb5dee77f47e114 100644 (file)
@@ -3,15 +3,21 @@ require "serverspec"
 # Required by serverspec
 set :backend, :exec
 
 # 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 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
 
 describe port(783) do
   it { should be_enabled }
   it { should be_running }
 end
 
 describe port(783) do
-  it { should be_listening }
+  it { should be_listening.with("tcp") }
 end
 end