Skip to content

Commit 8897a79

Browse files
Merge pull request #5645 from freedomofpress/fix-5514
Merge qa_loader and create-dev-data; add seen data.
2 parents 0454478 + f21e9bb commit 8897a79

9 files changed

Lines changed: 488 additions & 556 deletions

File tree

molecule/upgrade/side_effect.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
args:
2323
chdir: /var/www/securedrop
2424

25-
- name: Slap in latest create-dev-data script
25+
- name: Slap in latest loaddata script
2626
copy:
27-
src: ../../securedrop/create-dev-data.py
28-
dest: /var/www/securedrop/create-dev-data.py
27+
src: ../../securedrop/loaddata.py
28+
dest: /var/www/securedrop/loaddata.py
2929
mode: 0555
3030

3131
- name: Insert journalist test user
32-
command: /var/www/securedrop/create-dev-data.py --staging
32+
command: /var/www/securedrop/loaddata.py
3333
args:
3434
chdir: /var/www/securedrop
3535
become: yes

securedrop/bin/dev-deps

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,13 @@ function reset_demo() {
9292

9393
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
9494

95-
./create-dev-data.py
95+
# Can't pass an array environment variable with "docker --env", so
96+
# break up the string we can pass.
97+
if [ -n "${LOADDATA_ARGS:-""}" ]
98+
then
99+
IFS=" " read -r -a loaddata_arg_array <<< "${LOADDATA_ARGS}"
100+
./loaddata.py "${loaddata_arg_array[@]}"
101+
else
102+
./loaddata.py
103+
fi
96104
}

securedrop/bin/dev-shell

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ function docker_run() {
7474
-p "127.0.0.1:${SD_HOSTPORT_VNC}:5909" \
7575
-p "127.0.0.1:${SD_HOSTPORT_SI}:8080" \
7676
-p "127.0.0.1:${SD_HOSTPORT_JI}:8081" \
77+
-e NUM_JOURNALISTS \
7778
-e NUM_SOURCES \
79+
-e LOADDATA_ARGS \
7880
-e LC_ALL=C.UTF-8 \
7981
-e LANG=C.UTF-8 \
8082
-e PAGE_LAYOUT_LOCALES \

securedrop/create-dev-data.py

Lines changed: 0 additions & 223 deletions
This file was deleted.

0 commit comments

Comments
 (0)