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