Skip to content

Commit 408a4f1

Browse files
authored
Merge pull request #7701 from freedomofpress/stg-7696-apparmor-api2
Fix staging tests: add missing apparmor config for `api2` module files, add timeout for flaky apache restart
2 parents e1c821a + 29c299a commit 408a4f1

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

securedrop/journalist_app/api2/README.md renamed to API2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Journalist API v2
22

3-
This package implements and documents the synchronization strategy for the v2
3+
This package (in `securedrop/journalist_app/api2`) implements and documents the synchronization strategy for the v2
44
Journalist API.
55

66
| File | Contents |

molecule/testinfra/app/test_smoke.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""
44

55
import json
6+
import time
67
from pathlib import Path
78

89
import pytest
@@ -72,6 +73,8 @@ def test_weak_submission_key(host):
7273
# Install a weak key
7374
set_public_key(host, WEAK_KEY_CONTENTS)
7475
assert host.run("systemctl restart apache2").rc == 0
76+
# give the interfaces a chance to come up - a TODO could be polling here
77+
time.sleep(10)
7578
# Now try to hit the JI
7679
response = host.run("curl -Li http://localhost:8080/").stdout
7780
assert "HTTP/1.1 500 Internal Server Error" in response

securedrop/debian/app-code/etc/apparmor.d/usr.sbin.apache2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,11 @@
179179
/var/www/securedrop/journalist_app/__init__.py r,
180180
/var/www/securedrop/journalist_app/account.py r,
181181
/var/www/securedrop/journalist_app/admin.py r,
182+
/var/www/securedrop/journalist_app/api2/ r,
183+
/var/www/securedrop/journalist_app/api2/__init__.py r,
184+
/var/www/securedrop/journalist_app/api2/events.py r,
185+
/var/www/securedrop/journalist_app/api2/shared.py r,
186+
/var/www/securedrop/journalist_app/api2/types.py r,
182187
/var/www/securedrop/journalist_app/api.py r,
183188
/var/www/securedrop/journalist_app/col.py r,
184189
/var/www/securedrop/journalist_app/decorators.py r,

0 commit comments

Comments
 (0)