summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.stestr.conf3
-rw-r--r--.testr.conf8
-rw-r--r--lower-constraints.txt1
-rw-r--r--test-requirements.txt2
-rw-r--r--tox.ini20
5 files changed, 16 insertions, 18 deletions
diff --git a/.stestr.conf b/.stestr.conf
new file mode 100644
index 0000000..fc11840
--- /dev/null
+++ b/.stestr.conf
@@ -0,0 +1,3 @@
+[DEFAULT]
+test_path=./glance_store/tests/unit
+top_dir=./
diff --git a/.testr.conf b/.testr.conf
deleted file mode 100644
index b73ed8f..0000000
--- a/.testr.conf
+++ /dev/null
@@ -1,8 +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:-160} \
- ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./glance_store/tests/unit} $LISTOPT $IDOPTION
-
-test_id_option=--load-list $IDFILE
-test_list_option=--list
diff --git a/lower-constraints.txt b/lower-constraints.txt
index 7ca9a77..6d7c5a1 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -81,7 +81,6 @@ Sphinx==1.6.2
sphinxcontrib-websupport==1.0.1
stestr==2.0.0
stevedore==1.20.0
-testrepository==0.0.18
testscenarios==0.4
testtools==2.2.0
traceback2==1.4.0
diff --git a/test-requirements.txt b/test-requirements.txt
index f91942e..e7b9a44 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -12,7 +12,7 @@ coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
python-subunit>=1.0.0 # Apache-2.0/BSD
requests-mock>=1.2.0 # Apache-2.0
-testrepository>=0.0.18 # Apache-2.0/BSD
+stestr>=2.0.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
oslotest>=3.2.0 # Apache-2.0
diff --git a/tox.ini b/tox.ini
index 733351c..7f3a922 100644
--- a/tox.ini
+++ b/tox.ini
@@ -11,7 +11,7 @@ deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
passenv = OS_TEST_*
-commands = ostestr --slowest {posargs}
+commands = stestr run --slowest {posargs}
[testenv:docs]
basepython = python3
@@ -45,8 +45,13 @@ commands = bandit -r glance_store -x tests --skip B101,B110,B303
[testenv:cover]
basepython = python3
-setenv = VIRTUAL_ENV={envdir}
-commands = python setup.py testr --coverage --testr-args='^(?!.*test.*coverage).*$'
+setenv =
+ PYTHON=coverage run --source glance_store --parallel-mode
+commands =
+ stestr run {posargs}
+ coverage combine
+ coverage html -d cover
+ coverage xml -o cover/coverage.xml
[testenv:venv]
basepython = python3
@@ -56,13 +61,12 @@ commands = {posargs}
# running functional tests.
[testenv:functional-swift]
sitepackages = True
-setenv = OS_TEST_PATH=./glance_store/tests/functional/swift
-commands = ostestr --slowest --testr-args='glance_store.tests.functional.swift'
+commands =
+ stestr run --slowest --test-path=./glance_store/tests/functional/swift
[testenv:functional-filesystem]
-sitepackages = True
-setenv = OS_TEST_PATH=./glance_store/tests/functional/filesystem
-commands = ostestr --slowest --testr-args='glance_store.tests.functional.filesystem'
+commands =
+ stestr run --slowest --test-path=./glance_store/tests/functional/filesystem
[doc8]
ignore-path = .venv,.git,.tox,*glance_store/locale*,*lib/python*,glance_store.egg*,doc/build,*requirements.txt,lower-constraints.txt