-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clean up and split the integrations tests by os
- Loading branch information
Showing
5 changed files
with
146 additions
and
23 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,39 @@ | ||
../../../test/setup_db.sh | ||
#!/bin/bash | ||
set -x | ||
env | grep '^PG' | ||
|
||
# If you want to run this script for your own postgresql (run with | ||
# docker-compose) it will look like this: | ||
# PGHOST=127.0.0.1 PGUSER=root PGPASSWORD=password PGDATABASE=postgres \ | ||
PGUSER="${PGUSER:-postgres}" | ||
export PGUSER | ||
PGPORT="${PGPORT:-5432}" | ||
export PGPORT | ||
PGHOST="${PGHOST:-localhost}" | ||
|
||
for i in {1..10}; do | ||
if pg_isready -h "${PGHOST}" -p "${PGPORT}" -U "${PGUSER}" ; then | ||
break | ||
fi | ||
|
||
echo "Waiting for postgres to be ready..." | ||
sleep 2; | ||
done; | ||
|
||
createdb dbt | ||
psql -c "SELECT version();" | ||
psql -c "CREATE ROLE root WITH PASSWORD 'password';" | ||
psql -c "ALTER ROLE root WITH LOGIN;" | ||
psql -c "GRANT CREATE, CONNECT ON DATABASE dbt TO root WITH GRANT OPTION;" | ||
|
||
psql -c "CREATE ROLE noaccess WITH PASSWORD 'password' NOSUPERUSER;" | ||
psql -c "ALTER ROLE noaccess WITH LOGIN;" | ||
psql -c "GRANT CONNECT ON DATABASE dbt TO noaccess;" | ||
psql -c "CREATE ROLE dbt_test_user_1;" | ||
psql -c "CREATE ROLE dbt_test_user_2;" | ||
psql -c "CREATE ROLE dbt_test_user_3;" | ||
|
||
psql -c 'CREATE DATABASE "dbtMixedCase";' | ||
psql -c 'GRANT CREATE, CONNECT ON DATABASE "dbtMixedCase" TO root WITH GRANT OPTION;' | ||
|
||
set +x |