From: Tom Hughes Date: Tue, 18 Feb 2020 15:46:39 +0000 (+0000) Subject: Add test for stateofthemap cookbook X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/a48615f306bbad32ae9a6451ca59a8f34eeaa083 Add test for stateofthemap cookbook --- diff --git a/.kitchen.yml b/.kitchen.yml index 38b9c7f89..77ef19f96 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -182,6 +182,9 @@ suites: - name: squid run_list: - recipe[squid::default] + - name: stateofthemap + run_list: + - recipe[stateofthemap::default] - name: tilecache run_list: - recipe[tilecache::default] diff --git a/.travis.yml b/.travis.yml index 826576307..3f16680ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -123,6 +123,9 @@ jobs: - name: "Test Kitchen (squid)" script: - bundle exec kitchen test squid-ubuntu-1804 + - name: "Test Kitchen (stateofthemap)" + script: + - bundle exec kitchen test stateofthemap-ubuntu-1804 - name: "Test Kitchen (tilecache)" script: - bundle exec kitchen test tilecache-ubuntu-1804 diff --git a/cookbooks/stateofthemap/recipes/default.rb b/cookbooks/stateofthemap/recipes/default.rb index 01c4bc910..1bb8176f1 100644 --- a/cookbooks/stateofthemap/recipes/default.rb +++ b/cookbooks/stateofthemap/recipes/default.rb @@ -284,7 +284,9 @@ end package %w[ ruby ruby-dev + libssl-dev zlib1g-dev + pkg-config ] apache_module "expires" diff --git a/test/data_bags/stateofthemap/passwords.json b/test/data_bags/stateofthemap/passwords.json new file mode 100644 index 000000000..3ffc3847c --- /dev/null +++ b/test/data_bags/stateofthemap/passwords.json @@ -0,0 +1,10 @@ +{ + "id": "passwords", + "sotm2007": "sotm2007", + "sotm2008": "sotm2008", + "sotm2009": "sotm2009", + "sotm2010": "sotm2010", + "sotm2011": "sotm2011", + "sotm2012": "sotm2012", + "sotm2016": "sotm2016" +} diff --git a/test/integration/stateofhemap/serverspec/apache_spec.rb b/test/integration/stateofhemap/serverspec/apache_spec.rb new file mode 100644 index 000000000..446d3b915 --- /dev/null +++ b/test/integration/stateofhemap/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