There is no automated end-to-end testing that triggers on post-deploy steps or anything like that. Mozilla Infrasec will continually check that our server responds with the right security headers. However, there are some noted techniques for testing.
To run this, you need to have access and permissions to Prod
symbols.mozilla.org) and Stage (
Go to Prod and grab (or create) an API token with permission:
View All Symbols Uploads. For Stage, grab (or create) an API token
Upload Symbols Files. Then run the following script
$ ./bin/end-to-end-test-symbol-upload.py --help $ ./bin/end-to-end-test-symbol-upload.py PRODTOKEN STAGETOKEN
It all goes well, it will find the most recent upload on Prod that uses the “Upload by Download URL” and send that URL to Stage. If all goes well it will output something like this:
Stage user: email@example.com Prod user: firstname.lastname@example.org About to upload 916.6MB as URL to Stage. Took 3.5 minutes Files skipped: 0 Files uploaded: 72 Files uploaded, completed: 72 To see it, go to: https://symbols.stage.mozaws.net/uploads/upload/1186 It worked! 🎉 🎊 👍🏼 🌈
To test that the relationship between the web app and the Celery worker is
worker you can use a special, and public, endpoint called
When you send a HTTP POST request to it, it starts a Celery job that
writes to the main cache (Redis). Then, if you do a HTTP GET request
afterwards, it will either respond with 200 OK if the cache got updated
or 500 Internal Server Error if the cache did not get updated.
To run the test, first HTTP POST as per this example…:
▶ curl -v -XPOST localhost:8000/__task_tester__ > POST /__task_tester__ HTTP/1.1 > < HTTP/1.1 201 Created < Now make a GET request to this URL
Then, the HTTP GET:
▶ curl -v localhost:8000/__task_tester__ > GET /__task_tester__ HTTP/1.1 > < HTTP/1.1 200 OK < It works!