Skip to content

Commit

Permalink
Merge pull request #1428 from camptocamp/backport/1425-to-prod-2-8-ad…
Browse files Browse the repository at this point in the history
…vance

[Backport prod-2-8-advance] Remove print secret requirements
  • Loading branch information
sbrunner authored Sep 19, 2024
2 parents cc57aa1 + a0fb235 commit 5a4c208
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
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

0 comments on commit 5a4c208

Please sign in to comment.