This project compares content in publishing api with that in rummager to check whether both are in sync.
This project is normally intended to be invoked by Jenkins via the bin/run_automated_checks script.
The entry point is the CheckRunner class.
There are two phases to a run:
- Query Rummager and Publishing API public apis and import their data into an in-memory sqlite db
- Run several independent checks against the local db, each of which writes a csv output file in the working directory.
The exit code for a run is 1 if any check fails, 0 otherwise.
Each check can filter its usual output using a whitelist. This allows us to run the checks automatically in Jenkins and still keep the job green even though there may be some known problems we are working on.
Each check's purpose and way of working should be described in the checks readme
Whitelist entries have a reason for existing and an expiry date. Expired entries are reported as errors.
bundle install && bin/run_automated_checks
The CheckRunner requires a list of check class names as input.
These can be provided as command line arguments, in which case the CheckRunner will only run the requested checks.
If no checks are specified, all checks in the lib/checks directory are run.
There are a few environment variables which can be used to configure other behaviours:
CHECKER_DB_NAME=foo.dbto use a file-backed db instead of an in-memory oneSKIP_DATA_IMPORT=set(any value works) to not run the data import phaseWHITELIST_FILE=alternative_whitelist.ymlspecify a whitelist file other than the defaultwhitelist.ymlCHECK_OUTPUT_DIR=/tmp/my_check_outputspecify a csv output directory other than the default.SUPPRESS_PROGRESS=set(any value works) to not emit progress reporting to stdout
bundle exec govuk-lint-ruby && bundle exec rspec