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:
melanie witt
2026-01-30 18:18:41 -08:00
parent 59a7093915
commit 9908d87d0d
2 changed files with 7 additions and 0 deletions

View File

@@ -852,6 +852,9 @@
irrelevant-files: *nova-base-irrelevant-files
voting: false
- nova-tox-py312-threading
- openstack-tox-cover:
# Allow more time for unit and functional tests to run.
timeout: 4200
gate:
jobs:
- nova-live-migration

View File

@@ -220,10 +220,14 @@ setenv =
PYTHON=coverage run --source nova --parallel-mode
# run the test with eventlet
OS_NOVA_DISABLE_EVENTLET_PATCHING=False
deps =
{[testenv]deps}
openstack-placement>=9.0.0.0b1
extras =
commands =
coverage erase
stestr run {posargs}
{[testenv:functional-without-sample-db-tests]commands}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml