This website requires JavaScript.
Explore
Help
Sign In
Mirror
/
zulip
mirror of
https://github.com/zulip/zulip.git
Watch
1
Star
0
Fork
You've already forked zulip
0
Code
Issues
Projects
Releases
Wiki
Activity
8bd1429f4c
zulip
/
tools
/
setup
/
postgres-init-test-db
6 lines
79 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Add support for running OpenBSD in development environment.
2016-01-12 13:08:43 +01:00
#!/usr/bin/env bash
set -x
set -e
[manual] Humbug testing databases now backed by postgres Currently our test database is backed by sqlite; this commit moves us to using postgres for our all database needs. This, in conjunction with the patched django on github, allow us to have fewer hacks and more true-to-life tests. It also sets the stage for testing the bulk_create and schema search_path patches made to django. Developers will need to run: ./tools/postgres-init-test-db ./tools/do-destroy-rebuild-test-database this is assuming that they have already run: ./tools/postgres-init-db ./tools/do-destroy-rebuild-database at some point on this pg_cluster. (The ordering is important; it will other- wise complain about the south_migration table). (imported from commit c56c6f27e13df7ae10b2e643e65d669dde61af3d)
2013-05-08 05:30:42 +02:00
db tools: Simplify args for postgres-init-dev-db. We now just have two modes for setting up a dev/test database. This makes it easy to see these things side-by-side, when you're trying to understand how the two different databases get built: # dev: USERNAME=zulip DBNAME=zulip STATUS_FILE_NAME=migration_status_dev # test: USERNAME=zulip_test DBNAME=zulip_test STATUS_FILE_NAME=migration_status_test And then we make it more explicit the things that are common between dev and test (which are important things to understand when troubleshooting provision-related glitches): SEARCH_PATH=zulip,public PASSWORD=$("$(dirname "$0")/../../scripts/get-django-setting" LOCAL_DATABASE_PASSWORD) DBNAME_BASE=${DBNAME}_base We lose some "generality" here, but passing in arbitrary combinations of username/dbname/status_file to the script would cause chaos for our digest checks, and all the different template/base databases could cause confusion too.
2020-04-29 17:36:14 +02:00
"$(dirname "$0")/postgres-init-dev-db" test