Skip to content

Commit

Permalink
Use the banner function
Browse files Browse the repository at this point in the history
  • Loading branch information
justinclift committed Oct 3, 2024
1 parent e7fdbf7 commit e7dbd67
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,10 @@ test_run() {
# Verify the PostgreSQL data files are now the target version
PGVER=$(sudo cat postgres-data/PG_VERSION)
if [ "$PGVER" != "${TARGET}" ]; then
echo
echo "****************************************************************************"
echo "Automatic upgrade of PostgreSQL from version ${VERSION} to ${TARGET} FAILED!"
echo "****************************************************************************"
echo
banner '*' "'One shot' automatic upgrade of PostgreSQL from version ${VERSION} to ${TARGET} FAILED!"
FAILURE=1
else
echo
echo "*******************************************************************************"
echo "Automatic upgrade of PostgreSQL from version ${VERSION} to ${TARGET} SUCCEEDED!"
echo "*******************************************************************************"
echo
banner '*' "'One shot' automatic upgrade of PostgreSQL from version ${VERSION} to ${TARGET} SUCCEEDED!"
fi

# Shut down containers from previous test runs
Expand Down Expand Up @@ -90,12 +82,8 @@ done

# Check for failure
if [ "${FAILURE}" -ne 0 ]; then
echo
echo "FAILURE: Automatic upgrade of PostgreSQL failed in one of the tests. Please investigate."
echo
banner ' ' "FAILURE: Automatic upgrade of PostgreSQL failed in one of the tests. Please investigate."
exit 1
else
echo
echo "SUCCESS: Automatic upgrade testing of PostgreSQL to all versions up to $PGTARGET passed without issue."
echo
banner ' ' "SUCCESS: Automatic upgrade testing of PostgreSQL from all versions up to $PGTARGET passed without issue."
fi

0 comments on commit e7dbd67

Please sign in to comment.