diff --git a/.gitignore b/.gitignore index e25e2e6e1..23428d9a7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ *.swp .coverage .idea -.testrepository .stestr/* .tox/* .venv diff --git a/.stestr.conf b/.stestr.conf index 143720891..6d6791d74 100644 --- a/.stestr.conf +++ b/.stestr.conf @@ -1,4 +1,3 @@ [DEFAULT] test_path=${OS_TEST_PATH:-./manilaclient/tests/unit} top_dir=./ -group_regex=([^\.]*\.)* diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index dfff3189f..000000000 --- a/.testr.conf +++ /dev/null @@ -1,9 +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:-./manilaclient/tests/unit} $LISTOPT $IDOPTION - -test_id_option=--load-list $IDFILE -test_list_option=--list -group_regex=([^\.]*\.)* diff --git a/lower-constraints.txt b/lower-constraints.txt index 2adc85ce9..843378db1 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -22,6 +22,7 @@ future==0.16.0 hacking==0.12.0 idna==2.6 imagesize==0.7.1 +ipaddress==1.0.17 iso8601==0.1.11 Jinja2==2.10 jmespath==0.9.0 @@ -55,7 +56,7 @@ paramiko==2.0.0 pbr==2.0.0 pep8==1.5.7 positional==1.2.1 -prettytable==0.7.2 +prettytable==0.7.1 pyasn1==0.1.8 pycparser==2.18 pyflakes==0.8.1 diff --git a/test-requirements.txt b/test-requirements.txt index e3166394d..45b827dcf 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -11,6 +11,5 @@ fixtures>=3.0.0 # Apache-2.0/BSD mock>=2.0.0 # BSD os-testr>=1.0.0 # Apache-2.0 tempest>=17.1.0 # Apache-2.0 -testrepository>=0.0.18 # Apache-2.0/BSD testtools>=2.2.0 # MIT python-openstackclient>=3.12.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 6cfc87b63..6684e8828 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,8 @@ deps = -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.pyc" -delete - ostestr {posargs} + stestr run '{posargs}' + stestr slowest [testenv:debug] commands = oslo_debug_helper -t manilaclient/tests {posargs} @@ -64,11 +65,11 @@ commands = setenv = {[testenv]setenv} OS_TEST_PATH = ./manilaclient/tests/functional - OS_TEST_TIMEOUT = 500 - OS_MANILA_EXEC_DIR = {envdir}/bin + OS_SHARE_API_VERSION = 2 +passenv = OS_* commands = {envdir}/bin/python setup.py install - {envdir}/bin/python setup.py testr --testr-args='{posargs}' + stestr run '{posargs}' [testenv:genconfig] whitelist_externals = bash @@ -77,8 +78,14 @@ commands = {envdir}/bin/oslo-config-generator --config-file etc/oslo-config-generator/manilaclient.conf [testenv:cover] +setenv = + {[testenv]setenv} + PYTHON=coverage run --source manilaclient --parallel-mode commands = - python setup.py testr --coverage --testr-args='{posargs}' + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml coverage report [flake8]