mozilla / http-observatory

Mozilla HTTP Observatory
https://observatory.mozilla.org/
Mozilla Public License 2.0
1.84k stars 168 forks source link

Added grading to httpobs-local-scan to facilitate CI/CD integration #486

Closed tingdahl closed 1 year ago

tingdahl commented 1 year ago

This addition give the httpobs-local-scan similar capabilities as observability-cli to get a minimum grade or score. Syntax is identical to observability-cli.

The motivation is that httpobs-local-scan can be integrated into CI/CD pipelines.

One open question is if the error messages should be printed to stderr if the test fail. I can think that it may be useful to get an 'undisturbed' json as output if the test fails.

Default parameters are to require an 'F' and score 0, which are always met. Hence, I do not expect any change of the behavior of the script if the arguments are not specified.

tingdahl commented 1 year ago

Got some ideas how to handle the question with stderr. Hence did the PR too early, always good to sleep over it. Will add a new one in a few days.