]> git.openstreetmap.org Git - chef.git/blobdiff - test/integration/networking/serverspec/shorewall_spec.rb
Add basic tests for shorewall
[chef.git] / test / integration / networking / serverspec / shorewall_spec.rb
diff --git a/test/integration/networking/serverspec/shorewall_spec.rb b/test/integration/networking/serverspec/shorewall_spec.rb
new file mode 100644 (file)
index 0000000..2518b72
--- /dev/null
@@ -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