From: Tom Hughes Date: Sat, 4 Feb 2017 17:06:31 +0000 (+0000) Subject: Add tests for otrs cookbook X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/554bd8d38bacfb438b3831419292af02f45908ef?hp=deca3cd152bcfa1c6666b6702c5e0a0d33469f30 Add tests for otrs cookbook --- diff --git a/.kitchen.yml b/.kitchen.yml index cd6ebeb1a..c5f8a6988 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -48,6 +48,11 @@ suites: - name: networking run_list: - recipe[networking::default] + - name: otrs + run_list: + - recipe[accounts::default] + - recipe[chef::default] + - role[otrs] - name: tools run_list: - recipe[tools::default] diff --git a/test/data_bags/accounts/otrs.json b/test/data_bags/accounts/otrs.json new file mode 100644 index 000000000..e1354ef76 --- /dev/null +++ b/test/data_bags/accounts/otrs.json @@ -0,0 +1,7 @@ +{ + "id": "otrs", + "uid": "513", + "comment": "otrs.openstreetmap.org", + "home": "/opt/otrs", + "manage_home": false +} diff --git a/test/data_bags/otrs/passwords.json b/test/data_bags/otrs/passwords.json new file mode 100644 index 000000000..ccb5fecaf --- /dev/null +++ b/test/data_bags/otrs/passwords.json @@ -0,0 +1,4 @@ +{ + "id": "passwords", + "otrs": "database-password" +} diff --git a/test/integration/otrs/serverspec/apache_spec.rb b/test/integration/otrs/serverspec/apache_spec.rb new file mode 100644 index 000000000..9d5268271 --- /dev/null +++ b/test/integration/otrs/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 } +end + +describe port(443) do + it { should be_listening } +end