diff --git a/tools/generate-fixtures b/tools/generate-fixtures index 30e018394b..2752b59e22 100755 --- a/tools/generate-fixtures +++ b/tools/generate-fixtures @@ -4,16 +4,16 @@ function migration_status { ./manage.py migrate --list | sed 's/*/ /' > "$1" } -template_grep_error_code=$(echo "SELECT 1 from pg_database WHERE datname='humbug_test_template';" | python manage.py dbshell --settings=zproject.test_settings | grep -q "1 row"; echo $?) +template_grep_error_code=$(echo "SELECT 1 from pg_database WHERE datname='zulip_test_template';" | python manage.py dbshell --settings=zproject.test_settings | grep -q "1 row"; echo $?) if [ $template_grep_error_code == "0" ]; then migration_status zerver/fixtures/available-migrations if [ -e zerver/fixtures/migration-status ] && cmp -s zerver/fixtures/available-migrations zerver/fixtures/migration-status && [ "$1" != "--force" ]; then - psql -h localhost postgres humbug_test << EOF -DROP DATABASE humbug_test; -CREATE DATABASE humbug_test TEMPLATE humbug_test_template; + psql -h localhost postgres zulip_test << EOF +DROP DATABASE zulip_test; +CREATE DATABASE zulip_test TEMPLATE zulip_test_template; EOF exit 0 fi @@ -26,7 +26,7 @@ mkdir -p zerver/fixtures rm -f zerver/lib/time.pyc -echo "DROP SCHEMA humbug CASCADE; CREATE SCHEMA humbug;" | python manage.py dbshell --settings=zproject.test_settings +echo "DROP SCHEMA zulip CASCADE; CREATE SCHEMA zulip;" | python manage.py dbshell --settings=zproject.test_settings python manage.py syncdb --noinput --settings=zproject.test_settings python manage.py migrate --settings=zproject.test_settings --all migration_status "zerver/fixtures/migration-status" @@ -41,7 +41,7 @@ python manage.py dumpdata --settings=zproject.test_settings \ zerver.DefaultStream > zerver/fixtures/messages.json # create pristine template database, for fast fixture restoration after tests are run. -psql -h localhost postgres humbug_test << EOF -DROP DATABASE humbug_test_template; -CREATE DATABASE humbug_test_template TEMPLATE humbug_test; +psql -h localhost postgres zulip_test << EOF +DROP DATABASE zulip_test_template; +CREATE DATABASE zulip_test_template TEMPLATE zulip_test; EOF diff --git a/tools/postgres-init-test-db b/tools/postgres-init-test-db index 405f24a83d..09a3f47d4d 100755 --- a/tools/postgres-init-test-db +++ b/tools/postgres-init-test-db @@ -1,4 +1,3 @@ #/bin/sh -xe -$(dirname $0)/postgres-init-db humbug_test xxxxxxxxxxxx humbug_test humbug,public - +$(dirname $0)/postgres-init-db zulip_test xxxxxxxxxxxx zulip_test zulip,public diff --git a/zproject/test_settings.py b/zproject/test_settings.py index 6b76ea3708..a9afc40580 100644 --- a/zproject/test_settings.py +++ b/zproject/test_settings.py @@ -1,13 +1,13 @@ from settings import * import os -DATABASES["default"] = {"NAME": "humbug_test", - "USER": "humbug_test", +DATABASES["default"] = {"NAME": "zulip_test", + "USER": "zulip_test", "PASSWORD": "xxxxxxxxxxxx", "HOST": "localhost", - "SCHEMA": "humbug", + "SCHEMA": "zulip", "ENGINE": "django.db.backends.postgresql_psycopg2", - "TEST_NAME": "django_humbug_tests", + "TEST_NAME": "django_zulip_tests", "OPTIONS": { },} @@ -39,7 +39,7 @@ TUTORIAL_ENABLED = False # Disable use of memcached for caching CACHES['database'] = { 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', - 'LOCATION': 'humbug-database-test-cache', + 'LOCATION': 'zulip-database-test-cache', 'TIMEOUT': 3600, 'OPTIONS': { 'MAX_ENTRIES': 100000