Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upadd http-observatory tests #518
Conversation
Add a locally (docker) deployed http-observatory test. It requires a minimum score of 65, and also prints the test results to stdout.
highfive
commented
Oct 20, 2016
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @aneeshusa (or someone else) soon. |
|
I'm OK with relying on the public Mozilla API instance instead of running our own in CI. I would much prefer to avoid Docker, and it is optional for the cli client, so please rework this to avoid the docker and docker-compose dependencies. I believe that Travis uses a single mega-image for Trusty builds (which we are using), which already includes Node (for the cli client), although I might be wrong. No need to add Node to the Vagrant setup for now, since running the test suite in Vagrant already requires some extra undocumented steps. |
|
Hi @aneeshusa, So if we want to avoid docker and use the public api we can either:
Have I missed anything? BTW, docker is also available on travis. |
|
@jarondl That makes sense, I didn't think about that at 3am when making my last comment :) I appreciate all the work you've done on this PR, but I'm still unconvinced that we need Docker running Postgres, Redis and Celery all to scan one website in CI; we don't need to save results or handle backpressure, etc. I also see you've asked them to start building official Docker images, but in the meantime I am reluctant to use a community image (even one you built!). I would want to either a) wait for an official image or b) have a script in saltfs to build + store one; more importantly I would want to pin the image via digest in all cases to avoid unnecessary surprises, which is then another thing to update, etc. I'm not sure about the |
|
Hi @aneeshusa, with some tweaks and fixes ( mozilla/http-observatory#156 ) we could run a Python only scanner in about three lines of code. (Although with an unofficial API - maybe I could push something upstream..) |
|
@jarondl Thanks for going above and beyond, pushing improvements to the observatory upstream :) Running a Python only scanner, even if via an unofficial API, would be great. I'm OK with however many Python dependencies are needed, since these only need to be installed during testing; just drop them into the |
|
One note about integration: the tests already run under a Python3 interpreter, so you should be able to import the observatory modules and call functions directly from the test code, without needing a separate script/virtualenv and forking a separate Python process to run it. |
|
I filed mozilla/http-observatory#157 about an officially supported Python API, let's see what they say. |
april
commented
Nov 4, 2016
|
The unofficial local API is now official. There is both a function you can call as well as a simple CLI that outputs JSON similar to what the API would output. Hopefully that helps! |
tigercosmos
commented
Jan 7, 2018
|
What's the current status? |
|
@tigercosmos now that there is an official local API for the observatory, this work should be redone to use the official API. |
jarondl commentedOct 20, 2016
•
edited by larsbergstrom
Add a locally (docker) deployed http-observatory test.
It requires a minimum score of 65, and also prints the test results to
stdout.
Helps with #473.
Will fail on travis for two reasons:
The code is not so elegant, running external code from within Python, but it works.
This change is