Skip to content

Commit

Permalink
Use config.SECUREDROP_ROOT for worker path in test_worker.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rmol committed Aug 29, 2019
1 parent b236051 commit b2457d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions securedrop/bin/run-test
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ export PATH="/opt/venvs/securedrop-app-code/bin:$PATH"
REPOROOT=$(git rev-parse --show-toplevel)
cd "${REPOROOT}/securedrop"

PYTHONPATH=".:${PYTHONPATH:-}"
export PYTHONPATH

source "${BASH_SOURCE%/*}/dev-deps"

run_xvfb
Expand Down
8 changes: 7 additions & 1 deletion securedrop/tests/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ def start_rq_worker(config, queue_name=None):
if queue_name is None:
queue_name = config.RQ_WORKER_NAME
return subprocess.Popen(
["/opt/venvs/securedrop-app-code/bin/rqworker", queue_name], preexec_fn=os.setsid
[
"/opt/venvs/securedrop-app-code/bin/rqworker",
"--path",
config.SECUREDROP_ROOT,
queue_name
],
preexec_fn=os.setsid
)


Expand Down

0 comments on commit b2457d9

Please sign in to comment.