Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove print secret requirements #1425

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions print/print-apps/geomapfish/config.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,6 @@ throwErrorOnExtraParameters: true
defaultToSvg: true
resourceBundle: localisation

smtp:
username: ${SMTP_USER}
password: ${SMTP_PASSWORD}
fromAddress: [email protected]
host: email-smtp.eu-west-1.amazonaws.com
port: 465
ssl: True
subject: Map from GeoMapFish demo
body: Your printed map form GeoMapFish demo is <a href="{url}">here</a>.
storage: !s3reportStorage
bucket: print-mutualized
prefix: gmf_demo
endpointUrl: https://sos-ch-dk-2.exo.io/
region: ch-dk-2
accessKey: ${AWS_ACCESS_KEY_ID}
secretKey: ${AWS_SECRET_ACCESS_KEY}

allowedReferers: &allowedHosts
${DISABLE_MUTUALIZED_PRINT}- !hostnameMatch
${DISABLE_MUTUALIZED_PRINT} host: ${MUTUALIZED_PRINT_URL}
Expand Down
12 changes: 11 additions & 1 deletion tests/test_app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import time
from typing import Dict

import pytest
Expand Down Expand Up @@ -32,7 +33,16 @@
)
def test_url(url: str, params: Dict[str, str], timeout: int) -> None:
"""Tests that some URL didn't return an error."""
response = requests.get(url, params=params, verify=False, timeout=timeout) # nosec
code = 503
count = 0
while code == 503 and count < 5:
response = requests.get(url, params=params, verify=False, timeout=timeout)
code = response.status_code
count += 1
if code == 503:
print(f"Retry {count} for {url}")
time.sleep(1)

assert response.status_code == 200, response.text


Expand Down
Loading