Run functional test correctly

legacy-neutronclient-test-dsvm-functional job actually runs
neutronclient.tests.unit because .stestr.conf does not honor
OS_TEST_PATH. This commit fixes .stestr.conf to honor OS_TEST_PATH
specified in tox.ini.

Also fixes the logic of is_extension_enabled() in ClientTestBase
to check whether FWaaS v1 (fwaas) is enabled correctly.
Previously the logic checks a substring of a specified extension,
so 'fwaas' (FWaaS v1) matches 'fwaas_v2' (FWaaS v2),
which leads to a failure of FWaaS v1 CLI tests.

Change-Id: I958ad496b16cca8d03a7b84ebf5f8f031e4248ea
This commit is contained in:
Akihiro Motoki 2019-07-18 16:31:38 +09:00
parent cf95be3ea5
commit 2af19d55d6
2 changed files with 3 additions and 5 deletions

View File

@ -1,3 +1,3 @@
[DEFAULT]
test_path=./neutronclient/tests/unit
test_path=${OS_TEST_PATH:-./neutronclient/tests/unit}
top_dir=./

View File

@ -76,7 +76,5 @@ class ClientTestBase(base.ClientTestBase):
def is_extension_enabled(self, extension_alias):
extensions = self.parser.listing(self.neutron('ext-list'))
for extension in extensions:
if extension_alias in extension['alias']:
return True
return False
aliases = [e['alias'] for e in extensions]
return extension_alias in aliases