Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 1ebc8a0

Browse files
author
Sam Minton
committed
Merge branch 'develop' of https://github.com/ic-labs/django-icekit into develop
2 parents 59cb1aa + dbe6b20 commit 1ebc8a0

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

docs/contributing/testing.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,18 @@ test database and restores from `test_initial_data.sql` if available,
3232

3333
This reuses the test databases, and skips collectstatic and compress steps.
3434

35-
To achieve permanent speedip, create a data dump called `test_initial_data.sql`
35+
### To create a data dump with migrations applied
36+
37+
To achieve permanent speedup, create a data dump called `test_initial_data.sql`
3638
with migrations applied. It will be restored to the test database in
3739
`runtests.sh`, bypassing all migrations.
3840

41+
1. Create a fresh database `foo`
42+
2. Run migrations:
43+
44+
manage.py migrate
45+
46+
3. Dump the database to `test_initial_data.sql`
47+
48+
`pg_dump -O -x -f test_initial_data.sql -d foo`
3949

icekit/bin/entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ export BASE_SETTINGS_MODULE="${BASE_SETTINGS_MODULE:-develop}"
8080
# Get number of CPU cores, so we know how many processes to run.
8181
export CPU_CORES=$(python -c 'import multiprocessing; print multiprocessing.cpu_count();')
8282

83+
# Place GPG home directory in project directory.
84+
export GNUPGHOME="$ICEKIT_PROJECT_DIR/.gnupg"
85+
8386
# Get absolute directory for the `icekit` package.
8487
export ICEKIT_DIR=$(python -c 'import icekit, os; print os.path.abspath(os.path.dirname(icekit.__file__));')
8588

icekit/bin/setup-git-secret.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ set -e
1111

1212
cd "$ICEKIT_PROJECT_DIR"
1313

14-
# Place GPG home directory in project directory.
15-
export GNUPGHOME="$ICEKIT_PROJECT_DIR/.gnupg"
16-
1714
# Derive a fictitious email address for the encryption key.
1815
export GPG_EMAIL="${GPG_EMAIL:-git-secret@$ICEKIT_PROJECT_NAME.icekit.interaction.net.au}"
1916

0 commit comments

Comments
 (0)