Author: | Pierre-Yves Chibon <pingou@pingoured.fr> |
---|
RATS is the Run Another Test Service
, an application aimed to be an API
used by consumers (such as Bodhi or Pagure) to ask for a certain test to be
re-run by the test system (that will need to listen to this rats' messages).
Homepage: https://pagure.io/rats
As a consumer, using rats is fairly simple, submit a POST
or a GET
request to the /submit
endpoint with the following arguments
type
:pagure_pr
.item
(optional if result_id is specified):audit-2.8-1.fc26
FEDORA-2017-5e475c0b0d
rpms/python-arrow/pull-request/13
test
(optional if result_id is specified):simple-koji-ci
, AtomicCI
,
dist.rpmdeplint
or update.base_selinux
.result_id
(optional if item and test are specified):extras
(optional)Install the needed system libraries:
sudo dnf install git python2-virtualenv
Note
On Fedora 23 and earlier or on RHEL and derivative (CentOS, Scientific Linux) the package python2-virtualenv is named python-virtualenv
Retrieve the sources:
git clone https://pagure.io/rats.git cd rats
Set up
Install dependencies
create the virtualenv:
virtualenv rats_env source ./rats_env/bin/activate
Install the dependencies:
pip install -r requirements.txt
Create rats/client_secrets.json
:
cd rats oidc-register https://iddev.fedorainfracloud.org http://localhost:5050
Run the webserver:
./runserver.py
To get some profiling information you can also run it as:
./runserver.py --profile
This will launch the application at http://localhost:5050
Run the workers:
celery worker -A rats.lib.tasks
Monitor fedmsg:
In a terminal, in the clone of the rats git repository, run:
fedmsg-relay
In another terminal run:
fedmsg-tail --really-pretty --no-validate
The fedmsg messages sent by rats will be shown up in this second terminal.
To run unit-tests:
Install the dependencies:
pip install -r test-requirements.txt
Run it:
nosetests