From: Tom Hughes Date: Sun, 16 Feb 2020 23:06:05 +0000 (+0000) Subject: Add test for postgresql cookbook X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/e9ce4c47971a2555021a1802bcfc3860936ac44c Add test for postgresql cookbook --- diff --git a/.kitchen.yml b/.kitchen.yml index f46a4d1f8..0730adbfc 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -159,6 +159,13 @@ suites: attributes: web: readonly_database_host: readonly + - name: postgresql + run_list: + - recipe[postgresql::default] + attributes: + postgresql: + versions: + - 10 - name: python run_list: - recipe[python::default] diff --git a/.travis.yml b/.travis.yml index 78f216557..6ae8b5144 100644 --- a/.travis.yml +++ b/.travis.yml @@ -108,6 +108,9 @@ jobs: - name: "Test Kitchen (planet::replication)" script: - bundle exec kitchen test planet-replication-ubuntu-1804 + - name: "Test Kitchen (postgresql)" + script: + - bundle exec kitchen test postgresql-ubuntu-1804 - name: "Test Kitchen (python)" script: - bundle exec kitchen test python-ubuntu-1804 diff --git a/test/integration/postgresql/serverspec/postgresql_spec.rb b/test/integration/postgresql/serverspec/postgresql_spec.rb new file mode 100644 index 000000000..97edb601d --- /dev/null +++ b/test/integration/postgresql/serverspec/postgresql_spec.rb @@ -0,0 +1,17 @@ +require "serverspec" + +# Required by serverspec +set :backend, :exec + +describe package("postgresql-10") do + it { should be_installed } +end + +describe service("postgresql@10-main") do + it { should be_enabled } + it { should be_running } +end + +describe port(5432) do + it { should be_listening.with("tcp") } +end