mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
So `generate-fixtures` only ever did 9 lines of code (really 3 lines of actual code) in its normal mode of operation. But it was cluttered with lots of stuff that really only happened when you called it with the `-force` option, which was only invoked by `rebuild-test-database`. Now we inline most of the code into `rebuild-test-database`. And now `generate-fixtures` is simple (and doesn't support a `-force` flag.
15 lines
385 B
Bash
Executable File
15 lines
385 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
run()
|
|
{
|
|
"$(dirname "$0")/../../scripts/setup/terminate-psql-sessions" zulip zulip_test zulip_test_base zulip_test_template
|
|
psql -v ON_ERROR_STOP=1 -h localhost postgres zulip_test << EOF
|
|
DROP DATABASE IF EXISTS zulip_test;
|
|
CREATE DATABASE zulip_test TEMPLATE zulip_test_template;
|
|
EOF
|
|
"$(dirname "$0")/../../scripts/setup/flush-memcached"
|
|
}
|
|
|
|
run
|