Mercurial > hg > orthanc-tests
changeset 978:e6580e4c3b4e
fix psql downgrade tests
| author | Alain Mazy <am@orthanc.team> |
|---|---|
| date | Wed, 23 Sep 2026 11:33:51 +0200 |
| parents | 3448d318635c |
| children | a84b97f4350e |
| files | NewTests/PostgresUpgrades/downgrade.sh |
| diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/NewTests/PostgresUpgrades/downgrade.sh Tue Sep 22 15:09:04 2026 +0200 +++ b/NewTests/PostgresUpgrades/downgrade.sh Wed Sep 23 11:33:51 2026 +0200 @@ -1,4 +1,6 @@ #!/bin/bash +set -e +set -x pushd /scripts @@ -17,9 +19,11 @@ wget https://orthanc.uclouvain.be/hg/orthanc-databases/raw-file/default/PostgreSQL/Plugins/SQL/Downgrades/Rev11ToRev10.sql --output-document /tmp/downgrade.sql -psql -U postgres -f /tmp/downgrade.sql - +psql -v ON_ERROR_STOP=1 -U postgres -f /tmp/downgrade.sql +if [ $? -ne 0 ]; then + echo "psql failed!" + exit 1 +fi # if you want to test a downgrade procedure, you may use this code ... # psql -U postgres -f downgrade.sql popd -popd
