diff --git a/.gitignore b/.gitignore index f3d4990..3041f8d 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,7 @@ pip-log.txt .coverage .tox nosetests.xml -.testrepository +.stestr/ .venv # Translations diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..cfad34a --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./aodhclient/tests +top_dir=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 3b898cc..0000000 --- a/.testr.conf +++ /dev/null @@ -1,7 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ - OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ - OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \ - ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./aodhclient/tests} $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/setup.cfg b/setup.cfg index 46d54b9..13e0d6f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,7 +29,7 @@ test = oslotest>=1.10.0 # Apache-2.0 reno>=1.6.2 # Apache2 tempest>=10 - testrepository>=0.0.18 + stestr>=2.0.0 # Apache-2.0 testtools>=1.4.0 pifpaf[gnocchi]>=0.23 gnocchi[postgresql,file] diff --git a/tox.ini b/tox.ini index 85c2ac6..e26de8b 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,7 @@ passenv = GNOCCHI_* AODH_* OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE O deps = .[test] http://tarballs.openstack.org/aodh/aodh-master.tar.gz#egg=aodh[mysql] -commands = pifpaf run aodh -- python setup.py test --slowest --testr-args='{posargs}' +commands = pifpaf run aodh -- stestr run --slowest {posargs} [testenv:pep8] basepython = python3 @@ -31,8 +31,14 @@ commands = {posargs} [testenv:cover] basepython = python3 +setenv = + {[testenv]setenv} + PYTHON=coverage run --source aodhclient --parallel-mode commands = - python setup.py test --coverage --testr-args='{posargs}' + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml coverage report [testenv:releasenotes]