Merge "Switch to using stestr directly"

This commit is contained in:
Zuul 2019-07-08 04:08:06 +00:00 committed by Gerrit Code Review
commit 05cd037db5
4 changed files with 10 additions and 12 deletions

View File

@ -73,28 +73,28 @@ directory use:
.. code-block:: console
$ tox -e py27 zaqar.tests.unit.storage
$ tox -e py27 -- zaqar.tests.unit.storage
To run the tests specific to the MongoDB driver in the
``zaqar/tests/unit/storage/test_impl_mongodb.py`` file:
.. code-block:: console
$ tox -e py27 test_impl_mongodb
$ tox -e py27 -- test_impl_mongodb
To run the tests in the ``MongodbMessageTests`` class in
the ``tests/unit/storage/test_impl_mongodb.py`` file:
.. code-block:: console
$ tox -e py27 test_impl_mongodb.MongodbMessageTests
$ tox -e py27 -- test_impl_mongodb.MongodbMessageTests
To run the ``MongodbMessageTests.test_message_lifecycle`` test method in
the ``tests/unit/storage/test_impl_mongodb.py`` file:
.. code-block:: console
$ tox -e py27 test_impl_mongodb.MongodbMessageTests.test_message_lifecycle
$ tox -e py27 -- test_impl_mongodb.MongodbMessageTests.test_message_lifecycle
Running functional tests
------------------------
@ -131,7 +131,7 @@ To run functional tests in non-integration mode, execute:
.. code-block:: console
$ tox -e py27 zaqar.tests.functional
$ tox -e py27 -- zaqar.tests.functional
Using a custom MongoDB instance
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -60,7 +60,7 @@ sphinx===1.6.2
sphinxcontrib-websupport==1.0.1
SQLAlchemy==1.0.10
sqlalchemy-migrate==0.11.0
stestr==1.0.0
stestr==2.0.0
stevedore==1.20.0
testrepository==0.0.18
testresources==2.0.0

View File

@ -22,12 +22,11 @@ Pygments>=2.2.0 # BSD license
fixtures>=3.0.0 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
oslo.db>=4.27.0 # Apache-2.0
testresources>=2.0.0 # Apache-2.0/BSD
os-testr>=1.0.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
stestr>=2.0.0
#OSprofiler
osprofiler>=1.4.0 # Apache-2.0

View File

@ -13,13 +13,12 @@ setenv = VIRTUAL_ENV={envdir}
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
OS_TEST_PATH=./zaqar/tests/unit
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
ostestr --concurrency 1 {posargs}
stestr run --serial --slowest {posargs}
whitelist_externals = find
[testenv:integration]
@ -27,7 +26,7 @@ basepython = python3
setenv = {[testenv]setenv}
ZAQAR_TEST_INTEGRATION=1
OS_TEST_PATH=./zaqar/tests/functional
commands = ostestr --concurrency 1 {posargs}
commands = stestr run --serial --slowest {posargs}
[testenv:pep8]
basepython = python3
@ -51,7 +50,7 @@ setenv =
{[testenv]setenv}
PYTHON=coverage run --source zaqar --parallel-mode
commands =
stestr run {posargs}
{[testenv]commands}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml