diff schema/run_tests.sh @ 172:a422471db08a

Automate running DB-tests with an extra database run_tests.sh allows to run database tests easily without affecting other existing databases and on a clean basis. Because roles are cluster-wide, they cannot be easily droped and recreated without affecting other databases. Thus, moved their creation to roles.sql and in passing removed unnecessary role 'gemma'.
author Tom Gottfried <tom@intevation.de>
date Thu, 12 Jul 2018 16:30:01 +0200
parents
children f3a09fc9c1eb
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/schema/run_tests.sh	Thu Jul 12 16:30:01 2018 +0200
@@ -0,0 +1,9 @@
+#!/bin/sh -e
+
+dropdb --if-exists gemma_test
+createdb gemma_test
+
+psql -qv ON_ERROR_STOP= -f gemma.sql -d gemma_test
+psql -qv ON_ERROR_STOP= -f auth.sql -d gemma_test
+
+psql -Xf tap_tests.sql -d gemma_test