aboutsummaryrefslogtreecommitdiffstats
path: root/functest
diff options
context:
space:
mode:
authorPanagiotis Karalis <pkaralis@intracom-telecom.com>2018-02-23 14:56:25 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-03-13 16:36:08 +0100
commit0ce4ba21f5b934431adfa8a96f20065483a9f5c9 (patch)
tree9a7f128eb5c433fcdf0d6b6e63e3a9b872a8b6c2 /functest
parent632556645e8b3a4487c59e311e2cd43147c8d082 (diff)
Implement trunk ports testcase
The tempest testcases have been integrated from Neutron trunk testcases. It also enables every Neutron extension which may raise side effects [1]. [1] https://docs.openstack.org/tempest/latest/sampleconf.html JIRA: FUNCTEST-926 Change-Id: I05015acf119f504ce0a5539d677719de874594ad Signed-off-by: Panagiotis Karalis <pkaralis@intracom-telecom.com>
Diffstat (limited to 'functest')
-rw-r--r--functest/ci/testcases.yaml17
-rw-r--r--functest/opnfv_tests/openstack/tempest/conf_utils.py2
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py13
-rw-r--r--functest/tests/unit/openstack/tempest/test_tempest.py6
4 files changed, 37 insertions, 1 deletions
diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml
index 7cbe0e69f..1ebeef793 100644
--- a/functest/ci/testcases.yaml
+++ b/functest/ci/testcases.yaml
@@ -234,6 +234,23 @@ tiers:
module: 'functest.opnfv_tests.openstack.snaps.smoke'
class: 'SnapsSmoke'
+ -
+ case_name: neutron_trunk
+ project_name: functest
+ criteria: 100
+ blocking: false
+ description: >-
+ This test case runs the neutron trunk subtest of the
+ OpenStack Tempest suite. The list of test cases is
+ generated by Tempest having as input the relevant
+ testcase list file.
+ dependencies:
+ installer: '(fuel)|(apex)|(compass)'
+ scenario: ''
+ run:
+ module: 'functest.opnfv_tests.openstack.tempest.tempest'
+ class: 'TempestNeutronTrunk'
+
-
name: features
order: 2
diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py
index 6121ab970..b3d0d0139 100644
--- a/functest/opnfv_tests/openstack/tempest/conf_utils.py
+++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py
@@ -271,6 +271,8 @@ def configure_tempest_update_params(tempest_conf_file, res_dir,
rconfig.set('identity', 'v3_endpoint_type',
os.environ.get('OS_ENDPOINT_TYPE'))
+ rconfig.set('network-feature-enabled', 'api_extensions', 'all')
+
if os.environ.get('OS_ENDPOINT_TYPE') is not None:
sections = rconfig.sections()
services_list = [
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index 1d85e689a..059def384 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -289,6 +289,19 @@ class TempestSmokeSerial(TempestCommon):
self.option = ["--concurrency", "1"]
+class TempestNeutronTrunk(TempestCommon):
+ """Tempest neutron trunk testcase implementation."""
+ def __init__(self, **kwargs):
+ if "case_name" not in kwargs:
+ kwargs["case_name"] = 'neutron_trunk'
+ TempestCommon.__init__(self, **kwargs)
+ self.mode = "'neutron.tests.tempest.(api|scenario).test_trunk'"
+ self.res_dir = os.path.join(
+ getattr(config.CONF, 'dir_results'), 'neutron_trunk')
+ self.raw_list = os.path.join(self.res_dir, 'test_raw_list.txt')
+ self.list = os.path.join(self.res_dir, 'test_list.txt')
+
+
class TempestSmokeParallel(TempestCommon):
"""Tempest smoke parallel testcase implementation."""
def __init__(self, **kwargs):
diff --git a/functest/tests/unit/openstack/tempest/test_tempest.py b/functest/tests/unit/openstack/tempest/test_tempest.py
index 7a2394918..52d98465d 100644
--- a/functest/tests/unit/openstack/tempest/test_tempest.py
+++ b/functest/tests/unit/openstack/tempest/test_tempest.py
@@ -47,6 +47,7 @@ class OSTempestTesting(unittest.TestCase):
self.tempestfull_parallel = tempest.TempestFullParallel()
self.tempestcustom = tempest.TempestCustom()
self.tempestdefcore = tempest.TempestDefcore()
+ self.tempestneutrontrunk = tempest.TempestNeutronTrunk()
@mock.patch('functest.opnfv_tests.openstack.tempest.tempest.LOGGER.error')
@mock.patch('functest.opnfv_tests.openstack.tempest.tempest.LOGGER.debug')
@@ -79,7 +80,7 @@ class OSTempestTesting(unittest.TestCase):
elif self.tempestcommon.mode == 'full':
testr_mode = r"'^tempest\.'"
else:
- testr_mode = 'tempest.api.' + self.tempestcommon.mode
+ testr_mode = self.tempestcommon.mode
verifier_repo_dir = 'test_verifier_repo_dir'
cmd = ("cd {0};"
"testr list-tests {1} > {2};"
@@ -94,6 +95,9 @@ class OSTempestTesting(unittest.TestCase):
def test_gen_tl_full_mode(self):
self._test_gen_tl_mode_default('full')
+ def test_gen_tl_neutron_trunk_mode(self):
+ self._test_gen_tl_mode_default('neutron_trunk')
+
def test_verif_res_missing_verif_id(self):
self.tempestcommon.verification_id = None
with self.assertRaises(Exception):