Looks like browsers *do* send the query string in the OPTIONS request.
Change-Id: Id10e6e32890f1c9a09c91990e5a6ee729bf4d973
Related-Change: I985143bf03125a05792e79bc5e5f83722d6431b3
Some selenium webdrivers (e.g. Chrome, Firefox) support a headless
option so we can expose that as an option for the test runner too.
Use this in an attempt to fix "Error: cannot open display: :99" errors
seen in the gate.
Related-Bug: #1918864
Change-Id: I2a549ce829eb0bc38406575582202e1d8dd1a0e2
Unfortunately, we can't identify the user, so we can't map to an
account, so we can't respect whatever CORS metadata might be set on the
container.
As a result, the allowed origins must be configured cluster-wide. Add a
new config option, cors_preflight_allow_origin, for that; default it
to blank (ie, deny preflights from all origins, preserving existing
behavior), but allow either a comma-separated list of origins or
* (to allow all origins).
Change-Id: I985143bf03125a05792e79bc5e5f83722d6431b3
Co-Authored-By: Matthew Oliver <matt@oliver.net.au>
Drive-bys:
* Only copy outputs when there are outputs to copy
* Print tracebacks when there's an issue running a selenium driver
Change-Id: I0807af4525a13a30baf27ada40eeabe311b44296
This adds support for presigned GET URLs, at least.
Note that there is no support yet for preflight requests, so a whole
bunch of other CORS stuff *doesn't* work (yet). This was just an easy
first step.
Change-Id: I43150a630a2a7620099e6bfecaed3bbe958ba423
If you've got selenium installed (and working), the whole thing can be
automated pretty well; run main.py, wait while some windows pop up (or
use xvfb-run to run things on a virtual display), then check out what
tests were run on which browsers and whether any of them failed. Exit
code is the number of failed tests.
Includes tests against:
- Account
- Containers, with various ACLs/CORS settings
- Objects
- /info
- SLOs
- DLOs
- Symlinks
Include a gate job that runs the tests in firefox.
Areas for future work:
- Install chromium and chromedriver in the gate; tests should
automatically pick up on the fact that it's available
- Capture the web browser's console logs, too, so we can get
more info when things go wrong
Change-Id: Ic1d3a062419f1133c6e2f00a598867d567358c9f