testing: Run functional tests under [testenv:cover]
Nowadays a significant amount of our test code coverage comes from functional tests rather than just from unit tests. Currently, we run unit tests under [testenv:cover] via .stestr.conf and this just adds a run of the functional tests without API samples or notification samples or database-only tests, for the sake of brevity. In local testing this increases our Coverage Report from 87% to 89% overall. And for the particular file I'm interested in, nova/limit/utils.py, it increases coverage from 66% to 73%. I'm doing this as a base for a bug fix in nova/limit/utils.py in the next patch and with this change, I see coverage increase to 90%. Change-Id: Iec0a9e38f3641e973894748ab2a14d1bd838e904 Signed-off-by: melanie witt <melwittt@gmail.com>
This commit is contained in:
@@ -852,6 +852,9 @@
|
|||||||
irrelevant-files: *nova-base-irrelevant-files
|
irrelevant-files: *nova-base-irrelevant-files
|
||||||
voting: false
|
voting: false
|
||||||
- nova-tox-py312-threading
|
- nova-tox-py312-threading
|
||||||
|
- openstack-tox-cover:
|
||||||
|
# Allow more time for unit and functional tests to run.
|
||||||
|
timeout: 4200
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- nova-live-migration
|
- nova-live-migration
|
||||||
|
|||||||
@@ -220,10 +220,14 @@ setenv =
|
|||||||
PYTHON=coverage run --source nova --parallel-mode
|
PYTHON=coverage run --source nova --parallel-mode
|
||||||
# run the test with eventlet
|
# run the test with eventlet
|
||||||
OS_NOVA_DISABLE_EVENTLET_PATCHING=False
|
OS_NOVA_DISABLE_EVENTLET_PATCHING=False
|
||||||
|
deps =
|
||||||
|
{[testenv]deps}
|
||||||
|
openstack-placement>=9.0.0.0b1
|
||||||
extras =
|
extras =
|
||||||
commands =
|
commands =
|
||||||
coverage erase
|
coverage erase
|
||||||
stestr run {posargs}
|
stestr run {posargs}
|
||||||
|
{[testenv:functional-without-sample-db-tests]commands}
|
||||||
coverage combine
|
coverage combine
|
||||||
coverage html -d cover
|
coverage html -d cover
|
||||||
coverage xml -o cover/coverage.xml
|
coverage xml -o cover/coverage.xml
|
||||||
|
|||||||
Reference in New Issue
Block a user