]> git.openstreetmap.org Git - chef.git/commitdiff
Add test for subversion cookbook
authorTom Hughes <tom@compton.nu>
Thu, 20 Feb 2020 19:04:41 +0000 (19:04 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 20 Feb 2020 19:04:41 +0000 (19:04 +0000)
.kitchen.yml
.travis.yml
cookbooks/subversion/recipes/default.rb
test/integration/subversion/serverspec/apache_spec.rb [new file with mode: 0644]
test/integration/subversion/serverspec/subversion_spec.rb [new file with mode: 0644]

index 15e1dc2e22f832d96707e3da7060ab3438da7452..2e937d12146f41d479a4c29f11ff55d8ee1eba92 100644 (file)
@@ -209,6 +209,9 @@ suites:
   - name: stateofthemap
     run_list:
       - recipe[stateofthemap::default]
+  - name: subversion
+    run_list:
+      - recipe[subversion::default]
   - name: switch2osm
     run_list:
       - recipe[switch2osm::default]
index 7953740a3c400aeb678da48b21420709644cc67d..b9f212d8516a3a1164bb4e058bac7635cfbf1b54 100644 (file)
@@ -157,6 +157,9 @@ jobs:
     - name: "Test Kitchen (stateofthemap)"
       script:
         - bundle exec kitchen test stateofthemap-ubuntu-1804
+    - name: "Test Kitchen (subversion)"
+      script:
+        - bundle exec kitchen test subversion-ubuntu-1804
     - name: "Test Kitchen (switch2osm)"
       script:
         - bundle exec kitchen test switch2osm-ubuntu-1804
index 7014c2d5fa5f74e9735121b0e43f2f3c40e1c262..f5803e5ee478803e7830cd705319f1e712951b37 100644 (file)
@@ -43,11 +43,11 @@ apache_module "dav_fs" do
 end
 
 apache_module "dav_svn" do
-  package "libapache2-svn"
+  package "libapache2-mod-svn"
 end
 
 apache_module "authz_svn" do
-  package "libapache2-svn"
+  package "libapache2-mod-svn"
 end
 
 ssl_certificate "svn.openstreetmap.org" do
diff --git a/test/integration/subversion/serverspec/apache_spec.rb b/test/integration/subversion/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
diff --git a/test/integration/subversion/serverspec/subversion_spec.rb b/test/integration/subversion/serverspec/subversion_spec.rb
new file mode 100644 (file)
index 0000000..8bbecba
--- /dev/null
@@ -0,0 +1,8 @@
+require "serverspec"
+
+# Required by serverspec
+set :backend, :exec
+
+describe package("subversion") do
+  it { should be_installed }
+end