2016-01-12 13:08:43 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
2013-04-01 23:02:24 +02:00
|
|
|
|
2020-04-22 01:39:46 +02:00
|
|
|
run()
|
2018-07-06 16:17:52 +02:00
|
|
|
{
|
2020-06-16 01:36:02 +02:00
|
|
|
PGHOST=localhost PGUSER=zulip \
|
|
|
|
"$(dirname "$0")/../../scripts/setup/terminate-psql-sessions" zulip_test zulip_test_base zulip_test_template
|
2019-04-02 01:00:57 +02:00
|
|
|
psql -v ON_ERROR_STOP=1 -h localhost postgres zulip_test << EOF
|
2014-01-30 23:40:07 +01:00
|
|
|
DROP DATABASE IF EXISTS zulip_test;
|
2013-10-26 04:24:40 +02:00
|
|
|
CREATE DATABASE zulip_test TEMPLATE zulip_test_template;
|
2013-05-08 05:30:42 +02:00
|
|
|
EOF
|
2019-10-01 23:42:35 +02:00
|
|
|
"$(dirname "$0")/../../scripts/setup/flush-memcached"
|
2020-04-22 01:39:46 +02:00
|
|
|
}
|
2013-03-05 23:08:55 +01:00
|
|
|
|
2020-04-22 01:39:46 +02:00
|
|
|
run
|