don't use cloudfront on preview or staging

cloudfront caching isn't set up on those environments yet, so continue
to use flask for now - in the future we'll want to revert this once
those environments are up and running properly
This commit is contained in:
Leo Hemsted
2016-12-29 12:14:47 +00:00
parent 9e27574298
commit d4f23f1e44
2 changed files with 14 additions and 4 deletions

View File

@@ -397,8 +397,15 @@ def test_get_html_email_renderer_prepends_logo_path(notify_api):
('http://localhost:6012', 'http://localhost:6012/static/sub-path/filename.png'),
# on other environments, replace www with staging
('https://www.notifications.service.gov.uk', 'https://static.notifications.service.gov.uk/sub-path/filename.png'),
('https://www.notify.works', 'https://static.notify.works/sub-path/filename.png'),
('https://notify.works', 'https://static.notify.works/sub-path/filename.png'),
# staging and preview do not have cloudfront running, so should act as localhost
pytest.mark.xfail(('https://www.notify.works', 'https://static.notify.works/sub-path/filename.png')),
pytest.mark.xfail(('https://www.staging-notify.works', 'https://static.notify.works/sub-path/filename.png')),
pytest.mark.xfail(('https://notify.works', 'https://static.notify.works/sub-path/filename.png')),
pytest.mark.xfail(('https://staging-notify.works', 'https://static.notify.works/sub-path/filename.png')),
# these tests should be removed when cloudfront works on staging/preview
('https://www.notify.works', 'https://www.notify.works/static/sub-path/filename.png'),
('https://www.staging-notify.works', 'https://www.staging-notify.works/static/sub-path/filename.png'),
])
def test_get_logo_url_works_for_different_environments(base_url, expected_url):
branding_path = '/sub-path/'