Browse Source

Switch to use stestr for unit tests

The patch:
 * replaces .testr.conf by .stestr.conf
 * removes os-testr requirement
 * adds stestr requirement
 * edits tox.ini file so that only stestr is used
 * removes .testrepository from .gitignore

Change-Id: I14dae1cc58e3b5e2b3157df0803c3a15e9b55102
changes/32/525232/3
Martin Kopec 4 years ago
parent
commit
ea03aeedf2
5 changed files with 9 additions and 12 deletions
  1. +0
    -1
      .gitignore
  2. +3
    -0
      .stestr.conf
  3. +0
    -7
      .testr.conf
  4. +1
    -1
      requirements.txt
  5. +5
    -3
      tox.ini

+ 0
- 1
.gitignore View File

@ -27,7 +27,6 @@ cover/
!.coveragerc
.tox
nosetests.xml
.testrepository
.venv
.stestr


+ 3
- 0
.stestr.conf View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=./config_tempest/tests
top_dir=./

+ 0
- 7
.testr.conf View File

@ -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 ./ . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

+ 1
- 1
requirements.txt View File

@ -5,6 +5,6 @@
pbr>=1.8 # Apache-2.0
tempest>=14.0.0 # Apache-2.0
requests>=2.10.0,!=2.12.2 # Apache-2.0
os-testr>=0.8.0 # Apache-2.0
stestr>=1.1.0 # Apache-2.0
os-client-config>=1.26.0 # Apache-2.0
oslo_config>=3.23.0 # Apache-2.0

+ 5
- 3
tox.ini View File

@ -7,7 +7,6 @@ skipsdist = True
usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
setenv =
OS_TEST_PATH=./config_tempest/tests
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
whitelist_externals = *
@ -16,7 +15,7 @@ deps =
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
ostestr {posargs}
stestr --test-path ./config_tempest/tests run {posargs}
[testenv:pep8]
commands = flake8 {posargs}
@ -25,7 +24,10 @@ commands = flake8 {posargs}
commands = {posargs}
[testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}'
commands =
coverage erase
find . -type f -name "*.pyc" -delete
stestr --test-path ./config_tempest/tests run {posargs}
[testenv:docs]
commands = python setup.py build_sphinx


Loading…
Cancel
Save