Skip to content

Commit

Permalink
Add more debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
hhorak committed Sep 4, 2024
1 parent 510b694 commit 6fb5e70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/pg-test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ wait_for_postgres ()
output=$(docker exec -i "$cid" bash -c \
"psql -h localhost -tA -c 'select 1;' 2>/dev/null || :")
case $output in
1*) return ;;
1*) debug "server up" ; return ;;
"") ;;
*) echo "$output" ; false ;;
*) debug "server down" ; echo "$output" ; false ;;
esac
sleep 1
counter=$(( counter + 1 ))
Expand Down
2 changes: 2 additions & 0 deletions test/run_upgrade_test
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ assert_upgrade_succeeds ()
run_server "$DATADIR" "$UPGRADE_IMAGE" "-e POSTGRESQL_UPGRADE=$1"
docker logs "$CID"
wait_for_postgres "$CID"
docker logs "$CID"
eval "data_${dataspec}_check"
debug "the upgrading container of version '$upgrade_to' responded"
docker stop "$CID" >/dev/null
Expand All @@ -90,6 +91,7 @@ assert_upgrade_succeeds ()
docker rm -f "$CID" >/dev/null
done
}
export DEBUG=true

VERSION_FROM=$1 ; shift
UPGRADE_PATH=( "$@" )
Expand Down

0 comments on commit 6fb5e70

Please sign in to comment.