From: Tom Hughes Date: Sun, 14 Aug 2016 15:47:43 +0000 (+0100) Subject: Add basic tests for shorewall X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/3c8daa05b43084c9a04049ea57972760f5f4d845?ds=sidebyside Add basic tests for shorewall --- diff --git a/.kitchen.yml b/.kitchen.yml index c5880fc4b..e3e658424 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -15,6 +15,9 @@ suites: - name: munin run_list: - recipe[munin::default] + - name: networking + run_list: + - recipe[networking::default] - name: tools run_list: - recipe[tools::default] diff --git a/test/integration/networking/serverspec/shorewall_spec.rb b/test/integration/networking/serverspec/shorewall_spec.rb new file mode 100644 index 000000000..2518b7231 --- /dev/null +++ b/test/integration/networking/serverspec/shorewall_spec.rb @@ -0,0 +1,20 @@ +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