Tests: Make them callable from any path
This commit is contained in:
parent
a943ca055a
commit
799f060204
|
|
@ -16,7 +16,7 @@ DO $$ BEGIN
|
|||
END $$;
|
||||
SQL
|
||||
|
||||
for f in db/init/*.sql; do
|
||||
for f in `dirname($0)`/*.sql; do
|
||||
echo "Applying $f"
|
||||
psql -d "$DB_NAME" -f "$f"
|
||||
done
|
||||
|
|
|
|||
|
|
@ -9,7 +9,10 @@ DROP DATABASE IF EXISTS "$DB_NAME";
|
|||
CREATE DATABASE "$DB_NAME" OWNER "$ROLE";
|
||||
SQL
|
||||
|
||||
for f in db/init/*.sql; do
|
||||
for f in `dirname($0)`/*.sql; do
|
||||
if [[ "$f" == *"001_roles.sql"* ]]; then
|
||||
continue
|
||||
fi
|
||||
echo "Applying $f"
|
||||
psql -d "$DB_NAME" -f "$f"
|
||||
done
|
||||
|
|
|
|||
Loading…
Reference in New Issue