Skip to content
Browse files

Added a load/unload cycle to the tests

  • Loading branch information...
1 parent 037eab4 commit fc617f04ee3bbc917fafdc581f33b260527a9a28 @dvarrazzo committed
Showing with 8 additions and 2 deletions.
  1. +7 −1 dbtest/_test_template.sh
  2. +1 −1 dbtest/env.sh
View
8 dbtest/_test_template.sh
@@ -4,7 +4,13 @@ ${PGXN} install --nosudo ${LEVEL} ${EXTENSION} || exit
echo "CHECK"
${PGXN} check ${TEST_DSN} ${LEVEL} ${EXTENSION}
+echo "LOAD/UNLOAD"
+dropdb -h ${PG_HOST} -p ${PG_PORT} ${TEST_DB}
+createdb -h ${PG_HOST} -p ${PG_PORT} ${TEST_DB}
+${PGXN} load ${TEST_DSN} ${LEVEL} ${EXTENSION} || exit
+${PGXN} unload ${TEST_DSN} ${LEVEL} ${EXTENSION}
+
echo "UNINSTALL"
-dropdb -p ${PG_PORT} ${TEST_DB}
+dropdb -h ${PG_HOST} -p ${PG_PORT} ${TEST_DB}
${PGXN} uninstall --nosudo ${LEVEL} ${EXTENSION} || exit
View
2 dbtest/env.sh
@@ -3,7 +3,7 @@ export PG_ROOT=`pwd`/postgresql-${PG_VERSION}/root/
export PG_PORT=15432
export PG_HOST=localhost
export TEST_DB=contrib_regression
-export TEST_DSN="-h ${PG_HOST} -p ${PG_PORT}"
+export TEST_DSN="-d ${TEST_DB} -h ${PG_HOST} -p ${PG_PORT}"
export PYTHONPATH=`pwd`/..:$PYTHONPATH
export PATH=`pwd`/../bin:${PG_ROOT}/bin/:${PATH}
export PGXN=`which pgxn`

0 comments on commit fc617f0

Please sign in to comment.
Something went wrong with that request. Please try again.