From: Tom Hughes Date: Fri, 14 Feb 2020 14:46:10 +0000 (+0000) Subject: Check that servers are listening on the right protocols X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/f3250a00410a99a2b4ae47f16888acbb3b506ee9 Check that servers are listening on the right protocols --- diff --git a/test/integration/apache/serverspec/apache_spec.rb b/test/integration/apache/serverspec/apache_spec.rb index 9d5268271..446d3b915 100644 --- a/test/integration/apache/serverspec/apache_spec.rb +++ b/test/integration/apache/serverspec/apache_spec.rb @@ -13,9 +13,9 @@ describe service("apache2") do end describe port(80) do - it { should be_listening } + it { should be_listening.with("tcp") } end describe port(443) do - it { should be_listening } + it { should be_listening.with("tcp") } end diff --git a/test/integration/bind/serverspec/bind_spec.rb b/test/integration/bind/serverspec/bind_spec.rb index bdf529cf3..8986df12c 100644 --- a/test/integration/bind/serverspec/bind_spec.rb +++ b/test/integration/bind/serverspec/bind_spec.rb @@ -13,5 +13,6 @@ describe service("bind9") do end describe port(53) do - it { should be_listening } + it { should be_listening.with("udp") } + it { should be_listening.with("tcp") } end diff --git a/test/integration/blogs/serverspec/apache_spec.rb b/test/integration/blogs/serverspec/apache_spec.rb index 9d5268271..446d3b915 100644 --- a/test/integration/blogs/serverspec/apache_spec.rb +++ b/test/integration/blogs/serverspec/apache_spec.rb @@ -13,9 +13,9 @@ describe service("apache2") do end describe port(80) do - it { should be_listening } + it { should be_listening.with("tcp") } end describe port(443) do - it { should be_listening } + it { should be_listening.with("tcp") } end diff --git a/test/integration/exim/serverspec/exim_spec.rb b/test/integration/exim/serverspec/exim_spec.rb index 752a58ad4..2a6f6b2a9 100644 --- a/test/integration/exim/serverspec/exim_spec.rb +++ b/test/integration/exim/serverspec/exim_spec.rb @@ -13,5 +13,5 @@ describe service("exim4") do end describe port(25) do - it { should be_listening } + it { should be_listening.with("tcp") } end diff --git a/test/integration/forum/serverspec/apache_spec.rb b/test/integration/forum/serverspec/apache_spec.rb index 9d5268271..446d3b915 100644 --- a/test/integration/forum/serverspec/apache_spec.rb +++ b/test/integration/forum/serverspec/apache_spec.rb @@ -13,9 +13,9 @@ describe service("apache2") do end describe port(80) do - it { should be_listening } + it { should be_listening.with("tcp") } end describe port(443) do - it { should be_listening } + it { should be_listening.with("tcp") } end diff --git a/test/integration/forum/serverspec/mysql_spec.rb b/test/integration/forum/serverspec/mysql_spec.rb index 68e63582b..b0738f997 100644 --- a/test/integration/forum/serverspec/mysql_spec.rb +++ b/test/integration/forum/serverspec/mysql_spec.rb @@ -13,5 +13,5 @@ describe service("mysql") do end describe port(3306) do - it { should be_listening } + it { should be_listening.with("tcp") } end diff --git a/test/integration/munin-server/serverspec/apache_spec.rb b/test/integration/munin-server/serverspec/apache_spec.rb index 9d5268271..446d3b915 100644 --- a/test/integration/munin-server/serverspec/apache_spec.rb +++ b/test/integration/munin-server/serverspec/apache_spec.rb @@ -13,9 +13,9 @@ describe service("apache2") do end describe port(80) do - it { should be_listening } + it { should be_listening.with("tcp") } end describe port(443) do - it { should be_listening } + it { should be_listening.with("tcp") } end diff --git a/test/integration/munin/serverspec/munin_node_spec.rb b/test/integration/munin/serverspec/munin_node_spec.rb index 5fbe38339..cdae402e5 100644 --- a/test/integration/munin/serverspec/munin_node_spec.rb +++ b/test/integration/munin/serverspec/munin_node_spec.rb @@ -13,5 +13,5 @@ describe service("munin-node") do end describe port(4949) do - it { should be_listening } + it { should be_listening.with("tcp") } end diff --git a/test/integration/mysql/serverspec/mysql_spec.rb b/test/integration/mysql/serverspec/mysql_spec.rb index 68e63582b..b0738f997 100644 --- a/test/integration/mysql/serverspec/mysql_spec.rb +++ b/test/integration/mysql/serverspec/mysql_spec.rb @@ -13,5 +13,5 @@ describe service("mysql") do end describe port(3306) do - it { should be_listening } + it { should be_listening.with("tcp") } end diff --git a/test/integration/otrs/serverspec/apache_spec.rb b/test/integration/otrs/serverspec/apache_spec.rb index 9d5268271..446d3b915 100644 --- a/test/integration/otrs/serverspec/apache_spec.rb +++ b/test/integration/otrs/serverspec/apache_spec.rb @@ -13,9 +13,9 @@ describe service("apache2") do end describe port(80) do - it { should be_listening } + it { should be_listening.with("tcp") } end describe port(443) do - it { should be_listening } + it { should be_listening.with("tcp") } end diff --git a/test/integration/spamassassin/serverspec/spamassassin_spec.rb b/test/integration/spamassassin/serverspec/spamassassin_spec.rb index 2f2e643cf..1276f140c 100644 --- a/test/integration/spamassassin/serverspec/spamassassin_spec.rb +++ b/test/integration/spamassassin/serverspec/spamassassin_spec.rb @@ -13,5 +13,5 @@ describe service("spamassassin") do end describe port(783) do - it { should be_listening } + it { should be_listening.with("tcp") } end