diff --git a/test.sh b/test.sh index 323efc7..17b2ea6 100755 --- a/test.sh +++ b/test.sh @@ -95,14 +95,14 @@ test_run() { # Run the PostgreSQL container in one shot mode TARGET_TAG="${TARGET}-${FLAVOR}" docker compose -f docker-compose-pgauto.yml run --rm -e PGAUTO_ONESHOT=yes postgres -# # Verify the PostgreSQL data files are now the target version -# PGVER=$(sudo cat postgres-data/PG_VERSION) -# if [ "$PGVER" != "${TARGET}" ]; then -# banner '*' "'One shot' automatic upgrade of PostgreSQL from version ${VERSION} to ${TARGET} FAILED!" -# FAILURE=1 -# else -# banner '*' "'One shot' automatic upgrade of PostgreSQL from version ${VERSION} to ${TARGET} SUCCEEDED!" -# fi + # Verify the PostgreSQL data files are now the target version + PGVER=$(sudo cat postgres-data/PG_VERSION) + if [ "$PGVER" != "${TARGET}" ]; then + banner '*' "'One shot' automatic upgrade of PostgreSQL from version ${VERSION} to ${TARGET} FAILED!" + FAILURE=1 + else + banner '*' "'One shot' automatic upgrade of PostgreSQL from version ${VERSION} to ${TARGET} SUCCEEDED!" + fi # Shut down any containers that are still running docker compose -f docker-compose-pgauto.yml down