mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-02 20:59:06 +08:00
Tests: allow running integration tests in parallel
This is done in order to speed up test execution. Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
This commit is contained in:
@@ -35,4 +35,9 @@ have self-signed certificates. Example usage::
|
||||
|
||||
REQUESTS_CA_BUNDLE=/etc/pki/tls/certs/ca-bundle.crt tox -e integration
|
||||
|
||||
``MBS_TEST_WORKERS`` can be used to run the tests in parallel. For example to
|
||||
have 4 tests running in parallel one could call::
|
||||
|
||||
MBS_TEST_WORKERS=4 tox -e integration
|
||||
|
||||
.. _tests/integration/example.test.env.yaml: example.test.env.yaml
|
||||
|
||||
5
tox.ini
5
tox.ini
@@ -73,11 +73,12 @@ deps =
|
||||
kobo
|
||||
koji
|
||||
pytest
|
||||
pytest-xdist
|
||||
PyYAML
|
||||
requests
|
||||
sh
|
||||
# Set this to /etc/pki/tls/certs/ca-bundle.crt, for example,
|
||||
# if the instance tested has a self-signed certificate.
|
||||
passenv = REQUESTS_CA_BUNDLE MBS_TEST_CONFIG
|
||||
passenv = REQUESTS_CA_BUNDLE MBS_TEST_CONFIG MBS_TEST_WORKERS
|
||||
commands =
|
||||
pytest -vv --confcutdir=tests/integration {posargs:tests/integration}
|
||||
pytest -vv --confcutdir=tests/integration -n {env:MBS_TEST_WORKERS:0} {posargs:tests/integration}
|
||||
|
||||
Reference in New Issue
Block a user