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

index 1a90a238c93519bb1b9d12c6300b96ada2fd63ab..edfe0b8321479d98e3b4dfe86d4562734ea1c7b2 100644 (file)
@@ -88,6 +88,7 @@ jobs:
           - web-cgimap
           - web-frontend
           - web-rails
+          - wordpress
         os:
           - ubuntu-1804
       fail-fast: false
index 532299aa16ec1d4e69380a49f0fa1940b8dc8cac..572ec58dd80055da86e7543dec74d67446030af8 100644 (file)
@@ -311,3 +311,6 @@ suites:
   - name: web-rails
     run_list:
       - recipe[web::rails]
+  - name: wordpress
+    run_list:
+      - recipe[wordpress::default]
diff --git a/test/integration/wordpress/serverspec/apache_spec.rb b/test/integration/wordpress/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