Public schema table embedding (#803)

* Alter fixture to test objects in public schema

Properly erase and restore the public schema -- requires permissions to install pgcrypto each time.

* Test for fks through public schema tables

* Thanks @fab1an
This commit is contained in:
Joe Nelson
2017-02-12 16:32:15 -08:00
committed by GitHub
parent 1d8318ce26
commit 84f68c68cb
8 changed files with 43 additions and 28 deletions
+3 -1
View File
@@ -43,8 +43,10 @@ WHERE pg_stat_activity.datname = '$DB'
DROP DATABASE IF EXISTS $DB;
DROP ROLE IF EXISTS $TEST_USER_NAME;
CREATE USER $TEST_USER_NAME WITH LOGIN NOINHERIT PASSWORD '$TEST_USER_PASS' CREATEROLE;
CREATE USER $TEST_USER_NAME WITH SUPERUSER LOGIN NOINHERIT PASSWORD '$TEST_USER_PASS' CREATEROLE;
CREATE DATABASE $DB OWNER $TEST_USER_NAME;
\\connect $DB
ALTER SCHEMA public OWNER TO $TEST_USER_NAME;
EOF
PGDATABASE=$DB PGOPTIONS='-c client_min_messages=WARNING' psql "$URI" --set=db=$DB -Xq <<EOF