mirror of https://github.com/zulip/zulip.git
generate-fixtures: Be more robust to databases being missing
(imported from commit f42d673c433b8d3df4af79159831e57f5db1ee1c)
This commit is contained in:
parent
2b1a5ae141
commit
17826dba42
|
@ -12,7 +12,7 @@ if [ $template_grep_error_code == "0" ]; then
|
|||
cmp -s zerver/fixtures/available-migrations zerver/fixtures/migration-status &&
|
||||
[ "$1" != "--force" ]; then
|
||||
psql -h localhost postgres zulip_test << EOF
|
||||
DROP DATABASE zulip_test;
|
||||
DROP DATABASE IF EXISTS zulip_test;
|
||||
CREATE DATABASE zulip_test TEMPLATE zulip_test_template;
|
||||
EOF
|
||||
exit 0
|
||||
|
@ -37,6 +37,6 @@ python manage.py dumpdata --settings=zproject.test_settings \
|
|||
|
||||
# create pristine template database, for fast fixture restoration after tests are run.
|
||||
psql -h localhost postgres zulip_test << EOF
|
||||
DROP DATABASE zulip_test_template;
|
||||
DROP DATABASE IF EXISTS zulip_test_template;
|
||||
CREATE DATABASE zulip_test_template TEMPLATE zulip_test;
|
||||
EOF
|
||||
|
|
Loading…
Reference in New Issue