Skip to content

Commit

Permalink
Merge pull request #5645 from freedomofpress/fix-5514
Browse files Browse the repository at this point in the history
Merge qa_loader and create-dev-data; add seen data.
  • Loading branch information
sssoleileraaa authored Jan 6, 2021
2 parents 0454478 + f21e9bb commit 8897a79
Show file tree
Hide file tree
Showing 9 changed files with 488 additions and 556 deletions.
8 changes: 4 additions & 4 deletions molecule/upgrade/side_effect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
args:
chdir: /var/www/securedrop

- name: Slap in latest create-dev-data script
- name: Slap in latest loaddata script
copy:
src: ../../securedrop/create-dev-data.py
dest: /var/www/securedrop/create-dev-data.py
src: ../../securedrop/loaddata.py
dest: /var/www/securedrop/loaddata.py
mode: 0555

- name: Insert journalist test user
command: /var/www/securedrop/create-dev-data.py --staging
command: /var/www/securedrop/loaddata.py
args:
chdir: /var/www/securedrop
become: yes
10 changes: 9 additions & 1 deletion securedrop/bin/dev-deps
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,13 @@ function reset_demo() {

gpg2 --homedir /var/lib/securedrop/keys --no-default-keyring --keyring /var/lib/securedrop/keys/pubring.gpg --import /var/lib/securedrop/keys/test_journalist_key.pub

./create-dev-data.py
# Can't pass an array environment variable with "docker --env", so
# break up the string we can pass.
if [ -n "${LOADDATA_ARGS:-""}" ]
then
IFS=" " read -r -a loaddata_arg_array <<< "${LOADDATA_ARGS}"
./loaddata.py "${loaddata_arg_array[@]}"
else
./loaddata.py
fi
}
2 changes: 2 additions & 0 deletions securedrop/bin/dev-shell
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ function docker_run() {
-p "127.0.0.1:${SD_HOSTPORT_VNC}:5909" \
-p "127.0.0.1:${SD_HOSTPORT_SI}:8080" \
-p "127.0.0.1:${SD_HOSTPORT_JI}:8081" \
-e NUM_JOURNALISTS \
-e NUM_SOURCES \
-e LOADDATA_ARGS \
-e LC_ALL=C.UTF-8 \
-e LANG=C.UTF-8 \
-e PAGE_LAYOUT_LOCALES \
Expand Down
223 changes: 0 additions & 223 deletions securedrop/create-dev-data.py

This file was deleted.

Loading

0 comments on commit 8897a79

Please sign in to comment.