1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
#!/bin/sh
set -e
case $USER in
root) PGUSER=postgres ;;
*) PGUSER=$USER ;;
esac
pg_buildext \
-o "shared_preload_libraries=pg_partman_bgw" \
-o "pg_partman_bgw.dbname=postgres" \
-o "pg_partman_bgw.interval=10" \
-o "pg_partman_bgw.role=$PGUSER" \
virtualenv "$@" <<-EOF
psql -c "CREATE EXTENSION pgtap"
psql -c "CREATE EXTENSION pg_partman"
# run one of the normal tests
pg_prove -ovf test/test-id-10.sql
# run one of the bgw tests
pg_prove -ovf test/test_bgw/test-time-daily-bgw.sql
EOF
|