]> git.openstreetmap.org Git - chef.git/commitdiff
Add test for hot cookbook
authorTom Hughes <tom@compton.nu>
Mon, 24 Feb 2020 19:11:32 +0000 (19:11 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 24 Feb 2020 19:11:32 +0000 (19:11 +0000)
.github/workflows/test-kitchen.yml
.kitchen.yml
test/integration/hot/serverspec/apache_spec.rb [new file with mode: 0644]

index 1c83e25f4423e4a476f04051f13f574b090e5e37..5345c0ed3ebd9675b030e84f641fff8bfc6f9de1 100644 (file)
@@ -37,6 +37,7 @@ jobs:
           - git-web
           - gps-tile
           - hardware
+          - hot
           - incron
           - letsencrypt
           - mailman
index 8414198bb327c14e91e830d4ccc63449eabe8724..4195d7e0d7246c2ee2724b6403520dcc02be084a 100644 (file)
@@ -132,6 +132,9 @@ suites:
   - name: hardware
     run_list:
       - recipe[hardware::default]
+  - name: hot
+    run_list:
+      - recipe[hot::default]
   - name: incron
     run_list:
       - recipe[incron::default]
diff --git a/test/integration/hot/serverspec/apache_spec.rb b/test/integration/hot/serverspec/apache_spec.rb
new file mode 100644 (file)
index 0000000..446d3b9
--- /dev/null
@@ -0,0 +1,21 @@
+require "serverspec"
+
+# Required by serverspec
+set :backend, :exec
+
+describe package("apache2") do
+  it { should be_installed }
+end
+
+describe service("apache2") do
+  it { should be_enabled }
+  it { should be_running }
+end
+
+describe port(80) do
+  it { should be_listening.with("tcp") }
+end
+
+describe port(443) do
+  it { should be_listening.with("tcp") }
+end