Skip to content

Commit

Permalink
Merge pull request #4274 from freedomofpress/dev-configure-num-test-s…
Browse files Browse the repository at this point in the history
…ources

dev: customize number of test sources via NUM_SOURCES env var
  • Loading branch information
heartsucker authored Mar 19, 2019
2 parents 5ce9fa1 + 987f1ff commit 748e3ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions securedrop/bin/dev-shell
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function docker_run() {
find . \( -name '*.pyc' -o -name __pycache__ \) -delete
docker run \
--rm \
-e NUM_SOURCES \
--user "${USER:-root}" \
--volume "${TOPLEVEL}:${TOPLEVEL}" \
--workdir "${TOPLEVEL}/securedrop" \
Expand Down
2 changes: 1 addition & 1 deletion securedrop/create-dev-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def main():
is_admin=False)

# Add test sources and submissions
num_sources = 2
num_sources = int(os.getenv('NUM_SOURCES', 2))
for _ in range(num_sources):
create_source_and_submissions()

Expand Down

0 comments on commit 748e3ba

Please sign in to comment.