]> git.openstreetmap.org Git - chef.git/commitdiff
Add a test for the overpass cookbook
authorTom Hughes <tom@compton.nu>
Thu, 14 Jul 2022 10:03:32 +0000 (10:03 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 14 Jul 2022 10:05:24 +0000 (10:05 +0000)
.github/workflows/test-kitchen.yml
.kitchen.yml
cookbooks/overpass/attributes/default.rb
test/integration/overpass/serverspec/apache_spec.rb [new file with mode: 0644]

index 55c525f64d21e7ddbea90e252a780eb1b46add00..cde43686df462b8ff262499b665d5ed49b135000 100644 (file)
@@ -69,6 +69,7 @@ jobs:
           - osmosis
           - osqa
           - otrs
+          - overpass
           - passenger
           - php
           - php-apache
index b652e12eae8638fd70ef90ddb714b4ace3da0274..b7b9d9e60bab2538fef6f97c47fd8c35986a4b20 100644 (file)
@@ -225,6 +225,9 @@ suites:
   - name: otrs
     run_list:
       - recipe[otrs::default]
+  - name: overpass
+    run_list:
+      - recipe[overpass::default]
   - name: passenger
     run_list:
       - recipe[passenger::default]
index 0cfd5dabab150f08a34e257ab6e915c7b9ee5b1b..5c7cfcaaffdee732fb181a8b15c67c24086f9f17 100644 (file)
@@ -13,3 +13,5 @@ default[:overpass][:replication_url] = "https://planet.openstreetmap.org/replica
 default[:overpass][:restricted_api] = true
 
 default[:overpass][:logdir] = "/var/log/overpass"
+
+default[:accounts][:users][:overpass][:status] = :role
diff --git a/test/integration/overpass/serverspec/apache_spec.rb b/test/integration/overpass/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