From 29ac0f36a9d087a61fbfbe81f438461d8b8d0e5c Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Wed, 22 Apr 2020 00:04:02 +0000 Subject: [PATCH] rebuild-test-database: Clean up helper functions. We now have helpers for the two places where we create databases. There was already one helper in place, and I gave it a more concrete name, to match its actual database name in postgres. --- tools/rebuild-test-database | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tools/rebuild-test-database b/tools/rebuild-test-database index 916df56bfe..ca0ead5578 100755 --- a/tools/rebuild-test-database +++ b/tools/rebuild-test-database @@ -4,7 +4,15 @@ set -x export DJANGO_SETTINGS_MODULE=zproject.test_settings -create_template_database() +create_zulip_test() +{ +psql -v ON_ERROR_STOP=1 -h localhost postgres zulip_test < zerver/tests/fixtures/messages.json # create pristine template database, for fast fixture restoration after tests are run. -create_template_database +create_zulip_test_template