Skip to content

Commit

Permalink
Add the re-creation of the not-upgraded-pg data directory
Browse files Browse the repository at this point in the history
  • Loading branch information
justinclift committed Oct 3, 2024
1 parent a3c8172 commit 6765631
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ test_run() {
# Shut down containers from previous test runs
docker compose -f docker-compose-pgauto.yml down

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

# Delete the upgraded PostgreSQL data directory
sudo rm -rf postgres-data

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


# 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 6765631

Please sign in to comment.