Add functest-features based on Alpine 07/38607/2
authorCédric Ollivier <cedric.ollivier@orange.com>
Wed, 2 Aug 2017 10:14:16 +0000 (12:14 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Wed, 2 Aug 2017 11:21:51 +0000 (13:21 +0200)
It integrates the next testcases:
  - bgpvpn
  - security_scan
  - functest-odl-sfc
  - barometercollectd

It also modifies several cmds in the former testcases.yaml to ensure
backward compatibility.

Depends-On: I75aaf950f7b072c142fa9894cef7ef7f057adac3
Depends-On: I50219cad42bf0e085c2edf2e1abe149c2e057a99
Change-Id: Idf3d6b4a769edd1a5401748886e0ed64d4f5f281
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
build.sh
docker/features/Dockerfile [new file with mode: 0644]
docker/features/hooks/build [new file with mode: 0644]
docker/features/testcases.yaml [new file with mode: 0644]
docker/features/thirdparty-requirements.txt [new file with mode: 0644]
functest/ci/testcases.yaml

index dbc79e0..c7efc63 100644 (file)
--- a/build.sh
+++ b/build.sh
@@ -7,7 +7,7 @@ repo=${repo:-opnfv}
 (cd docker && docker build -t "${repo}/functest" .)
 docker push "${repo}/functest"
 
-for dir in docker/core docker/healthcheck docker/smoke; do
+for dir in docker/core docker/healthcheck docker/smoke docker/features; do
     (cd ${dir} && docker build -t "${repo}/functest-${dir##**/}" .)
     docker push "${repo}/functest-${dir##**/}"
 done
diff --git a/docker/features/Dockerfile b/docker/features/Dockerfile
new file mode 100644 (file)
index 0000000..3c52b5d
--- /dev/null
@@ -0,0 +1,17 @@
+FROM opnfv/functest-core
+
+ARG BRANCH=master
+ARG OPENSTACK_TAG=stable/ocata
+
+COPY thirdparty-requirements.txt thirdparty-requirements.txt
+RUN apk --no-cache add --virtual .build-deps --update \
+        python-dev build-base linux-headers libffi-dev \
+        openssl-dev libjpeg-turbo-dev git && \
+    pip install --no-cache-dir --src /src \
+        -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG \
+        -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
+        -rthirdparty-requirements.txt && \
+    rm -r thirdparty-requirements.txt && \
+    apk del .build-deps
+COPY testcases.yaml /usr/lib/python2.7/site-packages/functest/ci/testcases.yaml
+CMD ["bash","-c","prepare_env start && run_tests -t all"]
diff --git a/docker/features/hooks/build b/docker/features/hooks/build
new file mode 100644 (file)
index 0000000..e5d15b5
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+from="${DOCKER_REPO%/*}/functest-core"
+sed -i "s|^FROM.*$|FROM ${from}|" Dockerfile &&
+    docker build -t "${IMAGE_NAME}" .
+
+exit $?
diff --git a/docker/features/testcases.yaml b/docker/features/testcases.yaml
new file mode 100644 (file)
index 0000000..6bf01a3
--- /dev/null
@@ -0,0 +1,76 @@
+tiers:
+    -
+        name: features
+        order: 2
+        ci_loop: '(daily)|(weekly)'
+        description : >-
+            Test suites from feature projects
+            integrated in functest
+        testcases:
+            -
+                case_name: bgpvpn
+                project_name: sdnvpn
+                criteria: 100
+                blocking: false
+                description: >-
+                    Test suite from SDNVPN project.
+                dependencies:
+                    installer: '(fuel)|(apex)|(netvirt)'
+                    scenario: 'bgpvpn'
+                run:
+                    module: 'functest.core.feature'
+                    class: 'BashFeature'
+                    args:
+                        cmd: 'run_sdnvpn_tests.py'
+
+            -
+                case_name: security_scan
+                enabled: false
+                project_name: securityscanning
+                criteria: 100
+                blocking: false
+                description: >-
+                    Simple Security Scan
+                dependencies:
+                    installer: 'apex'
+                    scenario: '^((?!fdio).)*$'
+                run:
+                    module: 'functest.core.feature'
+                    class: 'BashFeature'
+                    args:
+                        cmd: '. /home/opnfv/functest/conf/stackrc && security_scan --config /usr/local/etc/securityscanning/config.ini'
+
+            -
+                case_name: functest-odl-sfc
+                enabled: false
+                project_name: sfc
+                criteria: 100
+                blocking: false
+                description: >-
+                    Test suite for odl-sfc to test two chains and two SFs
+                dependencies:
+                    installer: '(apex)|(fuel)'
+                    scenario: 'odl_l2-sfc'
+                run:
+                    module: 'functest.core.feature'
+                    class: 'BashFeature'
+                    args:
+                        cmd: 'run_sfc_tests.py'
+
+            -
+                case_name: barometercollectd
+                enabled: false
+                project_name: barometer
+                criteria: 100
+                blocking: false
+                description: >-
+                    Test suite for the Barometer project. Separate tests verify the
+                    proper configuration and functionality of the following
+                    collectd plugins Ceilometer, Hugepages, Memory RAS (mcelog),
+                    and OVS Events
+                dependencies:
+                    installer: 'fuel'
+                    scenario: 'kvm_ovs_dpdk_bar'
+                run:
+                     module: 'baro_tests.barometer'
+                     class: 'BarometerCollectd'
diff --git a/docker/features/thirdparty-requirements.txt b/docker/features/thirdparty-requirements.txt
new file mode 100644 (file)
index 0000000..ee2e5e9
--- /dev/null
@@ -0,0 +1,4 @@
+baro_tests
+sdnvpn
+securityscanning
+sfc
index c6aa636..6567274 100644 (file)
@@ -297,7 +297,7 @@ tiers:
                     module: 'functest.core.feature'
                     class: 'BashFeature'
                     args:
-                        cmd: 'cd /usr/local/lib/python2.7/dist-packages/sdnvpn/test/functest && python ./run_tests.py'
+                        cmd: 'run_sdnvpn_tests.py'
 
             -
                 case_name: security_scan
@@ -363,7 +363,7 @@ tiers:
                     module: 'functest.core.feature'
                     class: 'BashFeature'
                     args:
-                        cmd: 'cd /usr/local/lib/python2.7/dist-packages/sfc/tests/functest && python ./run_tests.py'
+                        cmd: 'run_sfc_tests.py'
 
             -
                 case_name: onos_sfc