view 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 source

#!/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