Make Immich restore test create database
This commit is contained in:
@@ -93,6 +93,12 @@ until docker exec restoretest-immich-postgres pg_isready -U immich -d immich >/d
|
|||||||
sleep 2
|
sleep 2
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Einige Postgres-Images melden bereits "ready", bevor die per ENV
|
||||||
|
# gewuenschte Datenbank sichtbar ist. Der Smoke-Test legt die isolierte
|
||||||
|
# Test-DB deshalb defensiv an, falls sie noch fehlt.
|
||||||
|
docker exec restoretest-immich-postgres sh -lc \
|
||||||
|
'psql -U immich -d postgres -tAc "select 1 from pg_database where datname = '\''immich'\''" | grep -q 1 || createdb -U immich immich'
|
||||||
|
|
||||||
# Stufe 2: Dump in Test-Postgres importieren
|
# Stufe 2: Dump in Test-Postgres importieren
|
||||||
# Hinweis: pg_restore mit --clean --if-exists, damit die Operation idempotent ist.
|
# Hinweis: pg_restore mit --clean --if-exists, damit die Operation idempotent ist.
|
||||||
# --no-owner / --no-privileges, weil im Test-Postgres kein produktiver User existiert.
|
# --no-owner / --no-privileges, weil im Test-Postgres kein produktiver User existiert.
|
||||||
|
|||||||
Reference in New Issue
Block a user