From: Tom Hughes Date: Thu, 20 Feb 2020 19:04:41 +0000 (+0000) Subject: Add test for subversion cookbook X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/c61dad4d0afbe41d85716e5231e76d94b6a529af Add test for subversion cookbook --- diff --git a/.kitchen.yml b/.kitchen.yml index 15e1dc2e2..2e937d121 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -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] diff --git a/.travis.yml b/.travis.yml index 7953740a3..b9f212d85 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/cookbooks/subversion/recipes/default.rb b/cookbooks/subversion/recipes/default.rb index 7014c2d5f..f5803e5ee 100644 --- a/cookbooks/subversion/recipes/default.rb +++ b/cookbooks/subversion/recipes/default.rb @@ -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 index 000000000..446d3b915 --- /dev/null +++ b/test/integration/subversion/serverspec/apache_spec.rb @@ -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 index 000000000..8bbecba74 --- /dev/null +++ b/test/integration/subversion/serverspec/subversion_spec.rb @@ -0,0 +1,8 @@ +require "serverspec" + +# Required by serverspec +set :backend, :exec + +describe package("subversion") do + it { should be_installed } +end