Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
bug 1431259: add headless tests for cdn #4765
This is the state of the browserless CDN tests after about 3 days. The tests cover every behavior in the CDN except for
During the course of writing these tests, I found another bug with the current configuration of the CDN, namely that when editing based on a revision (e.g., https://developer.allizom.org/en-US/docs/Web/HTML$edit/1299417) the publish will be met with a permission-denied error. This is due to the fact that this endpoint bypasses the
Thanks @escattone, this looks like a good framework for testing these headers. It will be next week before I can dig in.
I think this would be a good opportunity to use a dynamic fixture. If the
_kuma_status.json call returns headers like
x-cache that show the webserver is behind CloudFront, then expect CloudFront caching headers. Otherwise, expect
@@ Coverage Diff @@ ## master #4765 +/- ## ======================================= Coverage 95.82% 95.82% ======================================= Files 270 270 Lines 24568 24568 Branches 1750 1750 ======================================= Hits 23542 23542 Misses 814 814 Partials 212 212
An update to pytest (3.1.0 seems to work) is needed, or remove
pytest tests/headless --reruns=1 --base-url=<url to test>. Retries were needed to deal with staging 504s. This ran with no errors with
--base-url=http://localhost:8000, I got errors for:
I think some can be fixed by ensuring those pages are in the sample database, but others (legacy files, attachments) won't work in the development environment by default. I think that follow-on work can be done in a new PR, and I can do it.