Tests: Make them callable from any path

This commit is contained in:
Χγφτ Kompanion 2025-10-18 05:05:58 +02:00
parent a943ca055a
commit 799f060204
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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