Skip to content

Commit

Permalink
Remove *most* of the commented out stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
justinclift committed Oct 3, 2024
1 parent 443c3e6 commit 9647a8d
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ test_run() {
sudo rm -rf postgres-data
fi

# ### FIXME:
# echo "ls #1"
# sudo ls -la postgres-data
# ps -ef f

# Create the PostgreSQL database using a specific version of PostgreSQL
docker compose -f "docker-compose-pg${VERSION}.yml" run --rm server create_db

Expand All @@ -63,34 +58,16 @@ test_run() {
# Delete the upgraded PostgreSQL data directory
sudo rm -rf postgres-data

# ### FIXME: See if this helps
# docker system prune -f

# ### FIXME:
# echo "ls #2"
# sudo ls -la postgres-data
# ps -ef f
# df -h .

##
## Tests for one shot mode
##
banner '-' "Testing 'one shot' automatic upgrade mode for PostgreSQL ${VERSION} to ${TARGET}"

# Create the PostgreSQL database using a specific version of PostgreSQL
docker compose -f "docker-compose-pg${VERSION}.yml" run --rm server create_db
# sync

# Shut down all of the containers
docker compose -f "docker-compose-pg${VERSION}.yml" down --remove-orphans
# sync

# ### FIXME:
# echo "ls #3"
# sudo ls -la postgres-data
# ps -ef f
# df -h .
# docker ps --all

# 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
Expand All @@ -100,22 +77,13 @@ test_run() {
if [ "$PGVER" != "${TARGET}" ]; then
banner '*' "'One shot' automatic upgrade of PostgreSQL from version ${VERSION} to ${TARGET} FAILED!"
FAILURE=1

# sudo cat postgres-data/pg_upgrade_server.log

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

# ### FIXME:
# echo "ls #4"
# sudo ls -la postgres-data
# ps -ef f
# df -h .

# If running on CI, delete the Postgres Docker image to avoid space problems
if [ -n "$CI" ]; then
docker rmi -f $(docker images postgres -q)
Expand Down

0 comments on commit 9647a8d

Please sign in to comment.