]> git.openstreetmap.org Git - chef.git/commitdiff
Update networking tests for nftables switch
authorTom Hughes <tom@compton.nu>
Sun, 5 Mar 2023 16:20:59 +0000 (16:20 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 5 Mar 2023 16:20:59 +0000 (16:20 +0000)
test/integration/networking/serverspec/nftables_spec.rb [new file with mode: 0644]
test/integration/networking/serverspec/shorewall_spec.rb [deleted file]

diff --git a/test/integration/networking/serverspec/nftables_spec.rb b/test/integration/networking/serverspec/nftables_spec.rb
new file mode 100644 (file)
index 0000000..f1f1389
--- /dev/null
@@ -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 (file)
index 2518b72..0000000
+++ /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