]> git.openstreetmap.org Git - chef.git/blobdiff - test/integration/db-master/serverspec/postgresql_spec.rb
Add tests for db cookbook
[chef.git] / test / integration / db-master / serverspec / postgresql_spec.rb
diff --git a/test/integration/db-master/serverspec/postgresql_spec.rb b/test/integration/db-master/serverspec/postgresql_spec.rb
new file mode 100644 (file)
index 0000000..b6e920c
--- /dev/null
@@ -0,0 +1,17 @@
+require "serverspec"
+
+# Required by serverspec
+set :backend, :exec
+
+describe package("postgresql-9.5") do
+  it { should be_installed }
+end
+
+describe service("postgresql@9.5-main") do
+  it { should be_enabled }
+  it { should be_running }
+end
+
+describe port(5432) do
+  it { should be_listening.with("tcp") }
+end