From 9908d87d0dfcbac09a42ddc55ba9c332aa7066aa Mon Sep 17 00:00:00 2001 From: melanie witt Date: Fri, 30 Jan 2026 18:18:41 -0800 Subject: [PATCH] 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 --- .zuul.yaml | 3 +++ tox.ini | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/.zuul.yaml b/.zuul.yaml index 3a2402628680..33ae0b7d2cf7 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -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 diff --git a/tox.ini b/tox.ini index b309179506ba..d4f3aff83310 100644 --- a/tox.ini +++ b/tox.ini @@ -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