File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,15 +18,17 @@ docker run --detach --rm \
1818 postgres:15.13-alpine3.20 > /dev/null
1919
2020for _ in $( seq 1 60) ; do
21- if docker exec " $container_name " pg_isready \
22- -U humanly_analytics_test -d humanly_analytics_test > /dev/null 2>&1 ; then
21+ if docker exec " $container_name " sh -c \
22+ ' test "$(cat /proc/1/comm)" = postgres && pg_isready -U humanly_analytics_test -d humanly_analytics_test' \
23+ > /dev/null 2>&1 ; then
2324 break
2425 fi
2526 sleep 1
2627done
2728
28- if ! docker exec " $container_name " pg_isready \
29- -U humanly_analytics_test -d humanly_analytics_test > /dev/null 2>&1 ; then
29+ if ! docker exec " $container_name " sh -c \
30+ ' test "$(cat /proc/1/comm)" = postgres && pg_isready -U humanly_analytics_test -d humanly_analytics_test' \
31+ > /dev/null 2>&1 ; then
3032 echo " Analytics PostgreSQL fixture did not become ready." >&2
3133 docker logs " $container_name " >&2 || true
3234 exit 1
You can’t perform that action at this time.
0 commit comments