From 5f887d851efd652cb7bdd661b2d897668e930ce1 Mon Sep 17 00:00:00 2001 From: Chris Dent Date: Fri, 16 Sep 2016 08:47:56 +0000 Subject: [PATCH] [placement] Adjust the name of the gabbi tests Recently there was some confusion caused by the fact the gabbi tests used by the placement API have names like this: gabbi.suitemaker.test_placement_api_usage_create_provider This means that the names cannot be matched against tox interactions like: tox -efunctional -- nova.tests.functional.api.openstack This change makes it so the tests are generated with names like: nova.tests.functional.api.openstack.placement.test_placement_api.usage_create_provider So this change is submitted for review if people care. The other option is to: tox -efunctional placement gabbi was updated to allow this functionality in a clean form, so this depends on a change to global requirements but can work without it if required. Depends-On: Ie93c0e680a80fc7f157e2b5b9dfc2ab17f934f10 Change-Id: I8579bf7529a7298c4d049e47cc3cde1731a5e666 --- .testr.conf | 2 +- .../functional/api/openstack/placement/test_placement_api.py | 1 + test-requirements.txt | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.testr.conf b/.testr.conf index e35c8d8488d3..2e95b8305439 100644 --- a/.testr.conf +++ b/.testr.conf @@ -15,4 +15,4 @@ test_list_option=--list # special way. See the following for more details. # http://testrepository.readthedocs.io/en/latest/MANUAL.html#grouping-tests # https://gabbi.readthedocs.io/en/latest/#purpose -group_regex=(gabbi\.(?:driver|suitemaker)\.test_placement_api_([^_]+)) +group_regex=nova\.tests\.functional\.api\.openstack\.placement\.test_placement_api(?:\.|_)([^_]+) diff --git a/nova/tests/functional/api/openstack/placement/test_placement_api.py b/nova/tests/functional/api/openstack/placement/test_placement_api.py index 2e28d9556ca3..b81b6c07177c 100644 --- a/nova/tests/functional/api/openstack/placement/test_placement_api.py +++ b/nova/tests/functional/api/openstack/placement/test_placement_api.py @@ -23,5 +23,6 @@ def load_tests(loader, tests, pattern): """Provide a TestSuite to the discovery process.""" test_dir = os.path.join(os.path.dirname(__file__), TESTS_DIR) return driver.build_tests(test_dir, loader, host=None, + test_loader_name=__name__, intercept=fixtures.setup_app, fixture_module=fixtures) diff --git a/test-requirements.txt b/test-requirements.txt index 249bca650672..69aecb277ae4 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -24,7 +24,7 @@ testtools>=1.4.0 # MIT tempest-lib>=0.14.0 # Apache-2.0 bandit>=1.1.0 # Apache-2.0 openstackdocstheme>=1.5.0 # Apache-2.0 -gabbi>=1.24.0 # Apache-2.0 +gabbi>=1.25.0 # Apache-2.0 # vmwareapi driver specific dependencies oslo.vmware>=2.11.0 # Apache-2.0