aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docker/restapi/Dockerfile6
-rw-r--r--docker/smoke/Dockerfile6
-rw-r--r--docker/smoke/testcases.yaml17
-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
7 files changed, 66 insertions, 1 deletions
diff --git a/docker/restapi/Dockerfile b/docker/restapi/Dockerfile
index 32a8b3964..3286c8753 100644
--- a/docker/restapi/Dockerfile
+++ b/docker/restapi/Dockerfile
@@ -51,6 +51,12 @@ RUN apk --no-cache add --update python3 sshpass \
juju-wait && \
go get github.com/rogpeppe/godeps && \
(cd /src/vims-test && bundle config build.nokogiri --use-system-libraries && bundle install --system) && \
+ pip install --no-cache-dir --src /src -cupper-constraints.txt \
+ -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
+ -e git+https://github.com/openstack/neutron.git@$OPENSTACK_TAG#egg=neutron && \
+ pip install --no-cache-dir --src /src -cupper-constraints.txt \
+ -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
+ -r /src/neutron/test-requirements.txt && \
mkdir -p /etc/rally && \
printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
mkdir -p /var/lib/rally/database && rally db create && \
diff --git a/docker/smoke/Dockerfile b/docker/smoke/Dockerfile
index ad0ae9fcd..e09ea1c2c 100644
--- a/docker/smoke/Dockerfile
+++ b/docker/smoke/Dockerfile
@@ -34,6 +34,12 @@ RUN apk --no-cache add --virtual .build-deps --update \
git clone https://git.opendaylight.org/gerrit/p/integration/test.git /src/odl_test && \
(cd /src/odl_test && git checkout $ODL_TAG) && \
virtualenv --system-site-packages /src/tempest/.venv && \
+ pip install --no-cache-dir --src /src -cupper-constraints.txt \
+ -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
+ -e git+https://github.com/openstack/neutron.git@$OPENSTACK_TAG#egg=neutron && \
+ pip install --no-cache-dir --src /src -cupper-constraints.txt \
+ -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
+ -r /src/neutron/test-requirements.txt && \
rm -r upper-constraints.txt thirdparty-requirements.txt /src/odl_test/.git \
/src/os-faults /src/rally && \
mkdir -p /etc/rally && \
diff --git a/docker/smoke/testcases.yaml b/docker/smoke/testcases.yaml
index 9f017e5f3..44539c9ea 100644
--- a/docker/smoke/testcases.yaml
+++ b/docker/smoke/testcases.yaml
@@ -171,3 +171,20 @@ tiers:
run:
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'
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):