Add test for dmca cookbook
authorTom Hughes <tom@compton.nu>
Fri, 14 Feb 2020 15:42:01 +0000 (15:42 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 14 Feb 2020 15:42:01 +0000 (15:42 +0000)
.kitchen.yml
.travis.yml
test/integration/dmca/serverspec/apache_spec.rb [new file with mode: 0644]

index c2dc660fc9323e9502ed25ebfc83d816420ea6cc..22cd1a636cb85b54ffddba602d5bf0fd416e4643 100644 (file)
@@ -66,6 +66,12 @@ suites:
         roles:
           external:
             zone: test
+  - name: dmca
+    run_list:
+      - recipe[dmca::default]
+    attributes:
+      apache:
+        mpm: prefork
   - name: exim
     run_list:
       - recipe[exim::default]
index bff7bff049444dc47d1fecc94472e1c4c163b72f..67fe98a1904de179429588599e6e3717e8f71dea 100644 (file)
@@ -32,6 +32,9 @@ jobs:
     - name: "Test Kitchen (dhcpd)"
       script:
         - bundle exec kitchen test dhcpd-ubuntu-1804
+    - name: "Test Kitchen (dmca)"
+      script:
+        - bundle exec kitchen test dmca-ubuntu-1804
     - name: "Test Kitchen (exim)"
       script:
         - bundle exec kitchen test exim-ubuntu-1804
diff --git a/test/integration/dmca/serverspec/apache_spec.rb b/test/integration/dmca/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