File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 398
398
echo "host all all 127.0.0.1/32 trust" >> $PGDATA/pg_hba.conf
399
399
#postgres -D "$PGDATA" -k "$TMPDIR" -h localhost -p 5432 >$TMPDIR/logfile/postgresql.log 2>&1 &
400
400
pg_ctl -D "$PGDATA" -l $TMPDIR/logfile/postgresql.log -o "-k $TMPDIR -p 5432" start
401
+ for i in {1..60}; do
402
+ if pg_isready -h localhost -p 5432; then
403
+ echo "PostgreSQL is ready"
404
+ break
405
+ fi
406
+ sleep 1
407
+ if [ $i -eq 60 ]; then
408
+ echo "PostgreSQL is not ready after 60 seconds"
409
+ echo "PostgreSQL status:"
410
+ pg_ctl -D "$PGDATA" status
411
+ echo "PostgreSQL log content:"
412
+ cat $TMPDIR/logfile/postgresql.log
413
+ exit 1
414
+ fi
415
+ done
401
416
createdb -p 5432 -h localhost testing
402
417
psql -p 5432 -h localhost -d testing -Xaf ${ ./nix/tests/prime.sql }
403
418
pg_prove -p 5432 -h localhost -d testing ${ sqlTests } /*.sql
You can’t perform that action at this time.
0 commit comments