mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-20 22:39:43 -04:00
Compare commits
3 Commits
73cfb1a1ed
...
c6df1ace1b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6df1ace1b | ||
|
|
49d669a773 | ||
|
|
49252963f9 |
2
.github/workflows/checks.yml
vendored
2
.github/workflows/checks.yml
vendored
@@ -64,7 +64,7 @@ jobs:
|
||||
NOTIFY_E2E_TEST_PASSWORD: ${{ secrets.NOTIFY_E2E_TEST_PASSWORD }}
|
||||
- name: Check coverage threshold
|
||||
# TODO get this back up to 95
|
||||
run: poetry run coverage report -m --fail-under=94
|
||||
run: poetry run coverage report -m --fail-under=93
|
||||
|
||||
validate-new-relic-config:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -33,6 +33,7 @@ class DocumentDownloadClient:
|
||||
"document": file_contents,
|
||||
"is_csv": is_csv or False,
|
||||
},
|
||||
timeout=30
|
||||
)
|
||||
|
||||
response.raise_for_status()
|
||||
|
||||
@@ -29,6 +29,7 @@ class PerformancePlatformClient:
|
||||
self.performance_platform_url + payload["dataType"],
|
||||
json=payload,
|
||||
headers=headers,
|
||||
timeout=30
|
||||
)
|
||||
|
||||
if resp.status_code == 200:
|
||||
|
||||
@@ -35,6 +35,7 @@ def cronitor(task_name):
|
||||
params={
|
||||
"host": current_app.config["API_HOST_NAME"],
|
||||
},
|
||||
timeout=30
|
||||
)
|
||||
resp.raise_for_status()
|
||||
except requests.RequestException as e:
|
||||
|
||||
@@ -30,7 +30,7 @@ def get_certificate(url):
|
||||
res = redis_store.get(url)
|
||||
if res is not None:
|
||||
return res
|
||||
res = requests.get(url).text
|
||||
res = requests.get(url, timeout=30).text
|
||||
redis_store.set(url, res, ex=60 * 60) # 60 minutes
|
||||
_signing_cert_cache[url] = res
|
||||
return res
|
||||
|
||||
@@ -58,7 +58,7 @@ def sns_notification_handler(data, headers):
|
||||
if "SubscribeUrl" in message
|
||||
else message.get("SubscribeURL")
|
||||
)
|
||||
response = requests.get(url)
|
||||
response = requests.get(url, timeout=30)
|
||||
try:
|
||||
response.raise_for_status()
|
||||
except Exception as e:
|
||||
|
||||
@@ -8,7 +8,7 @@ def confirm_subscription(confirmation_request):
|
||||
current_app.logger.warning("SubscribeURL does not exist or empty")
|
||||
return
|
||||
|
||||
response = requests.get(url)
|
||||
response = requests.get(url, timeout=30)
|
||||
try:
|
||||
response.raise_for_status()
|
||||
except Exception as e:
|
||||
|
||||
@@ -104,7 +104,7 @@ def test_notifications_ses_200_autoconfirms_subscription(client, mocker):
|
||||
],
|
||||
)
|
||||
|
||||
requests_mock.assert_called_once_with("https://foo")
|
||||
requests_mock.assert_called_once_with("https://foo", timeout=30)
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user