Browse Source

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
changes/18/671418/2
Akihiro Motoki 2 years ago
parent
commit
2af19d55d6
  1. 2
      .stestr.conf
  2. 6
      neutronclient/tests/functional/base.py

2
.stestr.conf

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

6
neutronclient/tests/functional/base.py

@ -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
Loading…
Cancel
Save