From: Tom Hughes Date: Sun, 5 Mar 2023 16:20:59 +0000 (+0000) Subject: Update networking tests for nftables switch X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/331a509335cfdd223f4b39a0c02387b772aa7c87 Update networking tests for nftables switch --- diff --git a/test/integration/networking/serverspec/nftables_spec.rb b/test/integration/networking/serverspec/nftables_spec.rb new file mode 100644 index 000000000..f1f1389fd --- /dev/null +++ b/test/integration/networking/serverspec/nftables_spec.rb @@ -0,0 +1,20 @@ +require "serverspec" + +# Required by serverspec +set :backend, :exec + +describe package("nftables") do + it { should be_installed } +end + +describe service("nftables") do + it { should be_enabled } + it { should be_running } +end + +describe file("/etc/nftables.conf") do + it { should be_file } + its(:content) { should match(/echo-request.*accept/) } + its(:content) { should match(/http.*accept/) } + its(:content) { should match(/https.*accept/) } +end diff --git a/test/integration/networking/serverspec/shorewall_spec.rb b/test/integration/networking/serverspec/shorewall_spec.rb deleted file mode 100644 index 2518b7231..000000000 --- a/test/integration/networking/serverspec/shorewall_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "serverspec" - -# Required by serverspec -set :backend, :exec - -describe package("shorewall") do - it { should be_installed } -end - -describe service("shorewall") do - it { should be_enabled } - it { should be_running } -end - -describe file("/etc/shorewall/rules") do - it { should be_file } - its(:content) { should match(/ACCEPT.*echo-request/) } - its(:content) { should match(/ACCEPT.*http/) } - its(:content) { should match(/ACCEPT.*https/) } -end