File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,7 +45,12 @@ check_log $create_log creation
4545
4646echo Running dump and restore
4747# No real need to cat the log on failure here; psql will generate an error and even if not verify will almost certainly catch it
48- createdb test_load && (echo ' \df pg_getobject_address' && echo ' BEGIN;' && pg_dump test_dump && echo ' COMMIT;' ) | psql -q -v VERBOSITY=verbose -v ON_ERROR_STOP=true test_load > $restore_log || die 4 " Unable to load database"
48+ createdb test_load && psql -c ' \df pg_getobject_address' test_load && (echo ' BEGIN;' && pg_dump test_dump && echo ' COMMIT;' ) | psql -q -v VERBOSITY=verbose -v ON_ERROR_STOP=true test_load > $restore_log
49+ rc=$?
50+ if [ $rc ne 0 ]; then
51+ cat $restore_log
52+ die 4 " Unable to load database"
53+ fi
4954
5055echo Verifying restore
5156psql -f test/dump/verify.sql test_load > $verify_log || die 5 " Test failed"
You can’t perform that action at this time.
0 commit comments