Created
June 26, 2018 22:47
-
-
Save markprzepiora/342a50af9dd25e37b6a6b4d118b8cccd to your computer and use it in GitHub Desktop.
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
psql --dbname=postgres --no-psqlrc -c "DROP DATABASE IF EXISTS app_test;" | |
psql --dbname=postgres --no-psqlrc -c "CREATE DATABASE app_test;" | |
psql --dbname=app_test --no-psqlrc -c < db/structure.sql | |
for n in $(seq 2 $parallel_tests_count); do | |
( | |
psql --dbname=postgres --no-psqlrc -c "DROP DATABASE IF EXISTS app_test$n;" | |
psql --dbname=postgres --no-psqlrc -c "CREATE DATABASE app_test$n WITH TEMPLATE app_test;" | |
) & | |
done | |
wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment