summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build.sh8
-rw-r--r--docker/Dockerfile8
-rw-r--r--docker/components/Dockerfile4
-rw-r--r--docker/components/hooks/post_checkout6
-rw-r--r--docker/components/testcases.yaml56
-rw-r--r--docker/features/Dockerfile19
-rw-r--r--docker/features/hooks/post_checkout6
-rw-r--r--docker/features/testcases.yaml110
-rw-r--r--docker/features/thirdparty-requirements.txt4
-rw-r--r--docker/healthcheck/hooks/build7
-rw-r--r--docker/healthcheck/hooks/post_checkout6
-rw-r--r--docker/smoke/Dockerfile6
-rw-r--r--docker/smoke/hooks/build7
-rw-r--r--docker/smoke/hooks/post_checkout6
-rw-r--r--docker/smoke/testcases.yaml61
-rw-r--r--docker/smoke/thirdparty-requirements.txt7
-rw-r--r--functest/ci/config_functest.yaml5
-rw-r--r--functest/ci/testcases.yaml20
-rw-r--r--functest/opnfv_tests/openstack/tempest/conf_utils.py17
-rw-r--r--functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf.yaml13
-rw-r--r--functest/opnfv_tests/openstack/vping/ping.sh19
-rw-r--r--functest/opnfv_tests/sdn/odl/odl.py3
-rw-r--r--functest/opnfv_tests/sdn/onos/teston/adapters/connection.py2
-rw-r--r--functest/opnfv_tests/sdn/onos/teston/adapters/environment.py22
-rw-r--r--functest/tests/unit/core/test_feature.py4
-rw-r--r--functest/tests/unit/openstack/tempest/test_conf_utils.py5
-rw-r--r--functest/tests/unit/vnf/ims/test_cloudify_ims.py9
-rw-r--r--functest/tests/unit/vnf/ims/test_orchestra_ims.py2
-rw-r--r--functest/tests/unit/vnf/rnc/__init__.py0
29 files changed, 371 insertions, 71 deletions
diff --git a/build.sh b/build.sh
index dbc79e0d3..77ea98beb 100644
--- a/build.sh
+++ b/build.sh
@@ -3,11 +3,17 @@
set -e
repo=${repo:-opnfv}
+dirs="\
+docker/core \
+docker/healthcheck \
+docker/smoke \
+docker/features \
+docker/components"
(cd docker && docker build -t "${repo}/functest" .)
docker push "${repo}/functest"
-for dir in docker/core docker/healthcheck docker/smoke; do
+for dir in ${dirs}; do
(cd ${dir} && docker build -t "${repo}/functest-${dir##**/}" .)
docker push "${repo}/functest-${dir##**/}"
done
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 924da6847..89cf86a69 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -84,15 +84,15 @@ RUN wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/uppe
rm thirdparty-requirements.txt upper-constraints.txt
# OPNFV repositories
-RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/copper ${REPOS_DIR}/copper
-RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/domino ${REPOS_DIR}/domino
+RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/copper /src/copper
+RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/domino /src/domino
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/doctor ${REPOS_DIR}/doctor
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/promise ${REPOS_DIR}/promise
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/netready ${REPOS_DIR}/netready
-RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/fds ${REPOS_DIR}/fds
+RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/fds /src/fds
# other repositories
-RUN git clone --depth 1 -b $ODL_TAG https://git.opendaylight.org/gerrit/p/integration/test.git ${REPOS_DIR}/odl_test
+RUN git clone --depth 1 -b $ODL_TAG https://git.opendaylight.org/gerrit/p/integration/test.git /src/odl_test
RUN git clone --depth 1 -b $VIMS_TAG https://github.com/boucherv-orange/clearwater-live-test ${REPOS_VNFS_DIR}/vims-test
RUN git clone --depth 1 -b $VROUTER_TAG https://github.com/oolorg/opnfv-functest-vrouter.git ${REPOS_VNFS_DIR}/vrouter
RUN git clone --depth 1 https://github.com/wuwenbin2/OnosSystemTest.git ${REPOS_DIR}/onos
diff --git a/docker/components/Dockerfile b/docker/components/Dockerfile
new file mode 100644
index 000000000..8923e4cd7
--- /dev/null
+++ b/docker/components/Dockerfile
@@ -0,0 +1,4 @@
+FROM opnfv/functest-core
+
+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/components/hooks/post_checkout b/docker/components/hooks/post_checkout
new file mode 100644
index 000000000..20a6d4b95
--- /dev/null
+++ b/docker/components/hooks/post_checkout
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+from="${DOCKER_REPO%/*}/functest-core"
+sed -i "s|^FROM.*$|FROM ${from}|" Dockerfile
+
+exit $?
diff --git a/docker/components/testcases.yaml b/docker/components/testcases.yaml
new file mode 100644
index 000000000..1604161ac
--- /dev/null
+++ b/docker/components/testcases.yaml
@@ -0,0 +1,56 @@
+tiers:
+ -
+ name: components
+ order: 3
+ ci_loop: 'weekly'
+ description : >-
+ Extensive testing of OpenStack API.
+ testcases:
+ -
+ case_name: tempest_full_parallel
+ project_name: functest
+ criteria: 80
+ blocking: false
+ description: >-
+ The list of test cases is generated by
+ Tempest automatically and depends on the parameters of
+ the OpenStack deplopyment.
+ dependencies:
+ installer: '^((?!netvirt).)*$'
+ scenario: ''
+ run:
+ module: 'functest.opnfv_tests.openstack.tempest.tempest'
+ class: 'TempestFullParallel'
+
+ -
+ case_name: tempest_custom
+ project_name: functest
+ criteria: 100
+ blocking: false
+ description: >-
+ The test case allows running a customized list of tempest
+ test cases defined in a file under
+ <dir_functest_repo>/functest/opnfv_tests/openstack/
+ /tempest/custom_tests/test_list.txt
+ The file is empty and can be customized with the desired tests.
+ dependencies:
+ installer: 'unknown'
+ scenario: 'unknown'
+ run:
+ module: 'functest.opnfv_tests.openstack.tempest.tempest'
+ class: 'TempestCustom'
+
+ -
+ case_name: rally_full
+ project_name: functest
+ criteria: 90
+ blocking: false
+ description: >-
+ This test case runs the full suite of scenarios of the OpenStack
+ Rally suite using several threads and iterations.
+ dependencies:
+ installer: '^((?!netvirt).)*$'
+ scenario: ''
+ run:
+ module: 'functest.opnfv_tests.openstack.rally.rally'
+ class: 'RallyFull' \ No newline at end of file
diff --git a/docker/features/Dockerfile b/docker/features/Dockerfile
new file mode 100644
index 000000000..73f4d2cef
--- /dev/null
+++ b/docker/features/Dockerfile
@@ -0,0 +1,19 @@
+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 && \
+ git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/domino /src/domino && \
+ git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/copper /src/copper && \
+ rm -r thirdparty-requirements.txt /src/domino/.git /src/copper/.git && \
+ 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/post_checkout b/docker/features/hooks/post_checkout
new file mode 100644
index 000000000..20a6d4b95
--- /dev/null
+++ b/docker/features/hooks/post_checkout
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+from="${DOCKER_REPO%/*}/functest-core"
+sed -i "s|^FROM.*$|FROM ${from}|" Dockerfile
+
+exit $?
diff --git a/docker/features/testcases.yaml b/docker/features/testcases.yaml
new file mode 100644
index 000000000..48b1468df
--- /dev/null
+++ b/docker/features/testcases.yaml
@@ -0,0 +1,110 @@
+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: copper
+ enabled: false
+ project_name: copper
+ criteria: 100
+ blocking: false
+ description: >-
+ Test suite for policy management based on OpenStack Congress
+ dependencies:
+ installer: 'apex'
+ scenario: '^((?!fdio).)*$'
+ run:
+ module: 'functest.core.feature'
+ class: 'BashFeature'
+ args:
+ cmd: 'cd /src/copper/tests && bash run.sh && cd -'
+
+ -
+ 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: domino-multinode
+ enabled: false
+ project_name: domino
+ criteria: 100
+ blocking: false
+ description: >-
+ Test suite from Domino project.
+ dependencies:
+ installer: ''
+ scenario: ''
+ run:
+ module: 'functest.core.feature'
+ class: 'BashFeature'
+ args:
+ cmd: 'cd /src/domino && ./tests/run_multinode.sh'
+
+ -
+ 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
index 000000000..ee2e5e9ca
--- /dev/null
+++ b/docker/features/thirdparty-requirements.txt
@@ -0,0 +1,4 @@
+baro_tests
+sdnvpn
+securityscanning
+sfc
diff --git a/docker/healthcheck/hooks/build b/docker/healthcheck/hooks/build
deleted file mode 100644
index e5d15b526..000000000
--- a/docker/healthcheck/hooks/build
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-from="${DOCKER_REPO%/*}/functest-core"
-sed -i "s|^FROM.*$|FROM ${from}|" Dockerfile &&
- docker build -t "${IMAGE_NAME}" .
-
-exit $?
diff --git a/docker/healthcheck/hooks/post_checkout b/docker/healthcheck/hooks/post_checkout
new file mode 100644
index 000000000..20a6d4b95
--- /dev/null
+++ b/docker/healthcheck/hooks/post_checkout
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+from="${DOCKER_REPO%/*}/functest-core"
+sed -i "s|^FROM.*$|FROM ${from}|" Dockerfile
+
+exit $?
diff --git a/docker/smoke/Dockerfile b/docker/smoke/Dockerfile
index 22ff2eb3a..223ed64d0 100644
--- a/docker/smoke/Dockerfile
+++ b/docker/smoke/Dockerfile
@@ -2,6 +2,7 @@ FROM opnfv/functest-core
ARG BRANCH=master
ARG OPENSTACK_TAG=stable/ocata
+ARG ODL_TAG=release/beryllium-sr4
COPY thirdparty-requirements.txt thirdparty-requirements.txt
RUN apk --no-cache add --virtual .build-deps --update \
@@ -11,9 +12,12 @@ RUN apk --no-cache add --virtual .build-deps --update \
-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 && \
+ git clone --depth 1 -b $ODL_TAG https://git.opendaylight.org/gerrit/p/integration/test.git /src/odl_test && \
+ git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/fds /src/fds && \
ln -s /src/tempest /src/refstack-client/.tempest && \
virtualenv --system-site-packages /src/tempest/.venv && \
- rm -r thirdparty-requirements.txt /src/refstack-client/.git && \
+ rm -r thirdparty-requirements.txt /src/refstack-client/.git /src/odl_test/.git \
+ /src/fds/.git && \
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/smoke/hooks/build b/docker/smoke/hooks/build
deleted file mode 100644
index e5d15b526..000000000
--- a/docker/smoke/hooks/build
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-from="${DOCKER_REPO%/*}/functest-core"
-sed -i "s|^FROM.*$|FROM ${from}|" Dockerfile &&
- docker build -t "${IMAGE_NAME}" .
-
-exit $?
diff --git a/docker/smoke/hooks/post_checkout b/docker/smoke/hooks/post_checkout
new file mode 100644
index 000000000..20a6d4b95
--- /dev/null
+++ b/docker/smoke/hooks/post_checkout
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+from="${DOCKER_REPO%/*}/functest-core"
+sed -i "s|^FROM.*$|FROM ${from}|" Dockerfile
+
+exit $?
diff --git a/docker/smoke/testcases.yaml b/docker/smoke/testcases.yaml
index 69ea038a4..772196a00 100644
--- a/docker/smoke/testcases.yaml
+++ b/docker/smoke/testcases.yaml
@@ -85,6 +85,67 @@ tiers:
class: 'RefstackClient'
-
+ case_name: odl
+ project_name: functest
+ criteria: 100
+ blocking: true
+ description: >-
+ Test Suite for the OpenDaylight SDN Controller. It
+ integrates some test suites from upstream using
+ Robot as the test framework.
+ dependencies:
+ installer: ''
+ scenario: 'odl'
+ run:
+ module: 'functest.opnfv_tests.sdn.odl.odl'
+ class: 'ODLTests'
+ args:
+ suites:
+ - /src/odl_test/csit/suites/integration/basic
+ - /src/odl_test/csit/suites/openstack/neutron
+
+ -
+ case_name: odl_netvirt
+ project_name: functest
+ criteria: 100
+ blocking: false
+ description: >-
+ Test Suite for the OpenDaylight SDN Controller when
+ the NetVirt features are installed. It integrates
+ some test suites from upstream using Robot as the
+ test framework.
+ dependencies:
+ installer: 'apex'
+ scenario: 'os-odl_l3-nofeature'
+ run:
+ module: 'functest.opnfv_tests.sdn.odl.odl'
+ class: 'ODLTests'
+ args:
+ suites:
+ - /src/odl_test/csit/suites/integration/basic
+ - /src/odl_test/csit/suites/openstack/neutron
+ - /src/odl_test/csit/suites/openstack/connectivity
+
+ -
+ case_name: fds
+ project_name: functest
+ criteria: 100
+ blocking: false
+ description: >-
+ Test Suite for the OpenDaylight SDN Controller when GBP features are
+ installed. It integrates some test suites from upstream using
+ Robot as the test framework.
+ dependencies:
+ installer: 'apex'
+ scenario: 'odl.*-fdio'
+ run:
+ module: 'functest.opnfv_tests.sdn.odl.odl'
+ class: 'ODLTests'
+ args:
+ suites:
+ - /src/fds/testing/robot
+
+ -
case_name: snaps_smoke
project_name: functest
criteria: 100
diff --git a/docker/smoke/thirdparty-requirements.txt b/docker/smoke/thirdparty-requirements.txt
index be1980f2c..b298601b7 100644
--- a/docker/smoke/thirdparty-requirements.txt
+++ b/docker/smoke/thirdparty-requirements.txt
@@ -1,8 +1 @@
-baro_tests
-sdnvpn
-opera
-securityscanning
-sfc
-tosca-parser>=0.7.0 # Apache-2.0
-heat-translator>=0.4.0 # Apache-2.0
refstack-client
diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml
index e26b31398..31ce4b90e 100644
--- a/functest/ci/config_functest.yaml
+++ b/functest/ci/config_functest.yaml
@@ -10,9 +10,8 @@ general:
repo_netready: /home/opnfv/repos/netready
repo_barometer: /home/opnfv/repos/barometer
repo_doctor: /home/opnfv/repos/doctor
- repo_copper: /home/opnfv/repos/copper
- repo_domino: /home/opnfv/repos/domino
- repo_fds: /home/opnfv/repos/fds
+ repo_odl_test: /src/odl_test
+ repo_fds: /src/fds
repo_securityscan: /home/opnfv/repos/securityscanning
repo_vrouter: /home/opnfv/repos/vnfs/vrouter
functest: /home/opnfv/functest
diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml
index 0f8dff014..99c0cc202 100644
--- a/functest/ci/testcases.yaml
+++ b/functest/ci/testcases.yaml
@@ -162,8 +162,8 @@ tiers:
class: 'ODLTests'
args:
suites:
- - /home/opnfv/repos/odl_test/csit/suites/integration/basic
- - /home/opnfv/repos/odl_test/csit/suites/openstack/neutron
+ - /src/odl_test/csit/suites/integration/basic
+ - /src/odl_test/csit/suites/openstack/neutron
-
case_name: odl_netvirt
@@ -183,9 +183,9 @@ tiers:
class: 'ODLTests'
args:
suites:
- - /home/opnfv/repos/odl_test/csit/suites/integration/basic
- - /home/opnfv/repos/odl_test/csit/suites/openstack/neutron
- - /home/opnfv/repos/odl_test/csit/suites/openstack/connectivity
+ - /src/odl_test/csit/suites/integration/basic
+ - /src/odl_test/csit/suites/openstack/neutron
+ - /src/odl_test/csit/suites/openstack/connectivity
-
case_name: fds
@@ -204,7 +204,7 @@ tiers:
class: 'ODLTests'
args:
suites:
- - /home/opnfv/repos/fds/testing/robot
+ - /src/fds/testing/robot
-
case_name: onos
@@ -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
@@ -331,7 +331,7 @@ tiers:
module: 'functest.core.feature'
class: 'BashFeature'
args:
- cmd: 'cd /home/opnfv/repos/copper/tests && bash run.sh && cd -'
+ cmd: 'cd /src/copper/tests && bash run.sh && cd -'
-
case_name: multisite
@@ -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
@@ -411,7 +411,7 @@ tiers:
module: 'functest.core.feature'
class: 'BashFeature'
args:
- cmd: 'cd /home/opnfv/repos/domino && ./tests/run_multinode.sh'
+ cmd: 'cd /src/domino && ./tests/run_multinode.sh'
-
case_name: gluon_vping
diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py
index d494db5eb..2313ec04b 100644
--- a/functest/opnfv_tests/openstack/tempest/conf_utils.py
+++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py
@@ -15,6 +15,8 @@ import re
import shutil
import subprocess
+import yaml
+
from functest.utils.constants import CONST
import functest.utils.functest_utils as ft_utils
import functest.utils.openstack_utils as os_utils
@@ -38,6 +40,8 @@ TEMPEST_RAW_LIST = os.path.join(TEMPEST_RESULTS_DIR, 'test_raw_list.txt')
TEMPEST_LIST = os.path.join(TEMPEST_RESULTS_DIR, 'test_list.txt')
REFSTACK_RESULTS_DIR = os.path.join(CONST.__getattribute__('dir_results'),
'refstack')
+TEMPEST_CONF_YAML = pkg_resources.resource_filename(
+ 'functest', 'opnfv_tests/openstack/tempest/custom_tests/tempest_conf.yaml')
CI_INSTALLER_TYPE = CONST.__getattribute__('INSTALLER_TYPE')
CI_INSTALLER_IP = CONST.__getattribute__('INSTALLER_IP')
@@ -328,6 +332,19 @@ def configure_tempest_update_params(tempest_conf_file,
config.set(service, 'endpoint_type',
CONST.__getattribute__('OS_ENDPOINT_TYPE'))
+ logger.debug('Add/Update required params defined in tempest_conf.yaml '
+ 'into tempest.conf file')
+ with open(TEMPEST_CONF_YAML) as f:
+ conf_yaml = yaml.safe_load(f)
+ if not conf_yaml:
+ sections = config.sections()
+ for section in conf_yaml:
+ if section not in sections:
+ config.add_section(section)
+ sub_conf = conf_yaml.get(section)
+ for key, value in sub_conf.items():
+ config.set(section, key, value)
+
with open(tempest_conf_file, 'wb') as config_file:
config.write(config_file)
diff --git a/functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf.yaml b/functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf.yaml
new file mode 100644
index 000000000..b47a9736a
--- /dev/null
+++ b/functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf.yaml
@@ -0,0 +1,13 @@
+# This is an empty configuration file to be filled up with the desired options
+# to generate a custom tempest.conf
+# Examples:
+# network-feature-enabled:
+# port_security: True
+
+# volume-feature-enabled:
+# api_v1: False
+
+# validation:
+# image_ssh_user: root
+# ssh_timeout: 300
+
diff --git a/functest/opnfv_tests/openstack/vping/ping.sh b/functest/opnfv_tests/openstack/vping/ping.sh
index 693b86825..15f5e84e1 100644
--- a/functest/opnfv_tests/openstack/vping/ping.sh
+++ b/functest/opnfv_tests/openstack/vping/ping.sh
@@ -1,13 +1,10 @@
#!/bin/sh
-while true; do
- ping -c 1 $1 2>&1 >/dev/null
- RES=$?
- if [ "Z$RES" = "Z0" ] ; then
- echo 'vPing OK'
- break
- else
- echo 'vPing KO'
- fi
- sleep 1
-done \ No newline at end of file
+
+ping -c 1 $1 2>&1 >/dev/null
+RES=$?
+if [ "Z$RES" = "Z0" ] ; then
+ echo 'vPing OK'
+else
+ echo 'vPing KO'
+fi
diff --git a/functest/opnfv_tests/sdn/odl/odl.py b/functest/opnfv_tests/sdn/odl/odl.py
index 5724012ca..841da834b 100644
--- a/functest/opnfv_tests/sdn/odl/odl.py
+++ b/functest/opnfv_tests/sdn/odl/odl.py
@@ -66,8 +66,7 @@ class ODLResultVisitor(robot.api.ResultVisitor):
class ODLTests(testcase.TestCase):
"""ODL test runner."""
- odl_test_repo = os.path.join(
- constants.CONST.__getattribute__('dir_repos'), 'odl_test')
+ odl_test_repo = constants.CONST.__getattribute__('dir_repo_odl_test')
neutron_suite_dir = os.path.join(odl_test_repo,
"csit/suites/openstack/neutron")
basic_suite_dir = os.path.join(odl_test_repo,
diff --git a/functest/opnfv_tests/sdn/onos/teston/adapters/connection.py b/functest/opnfv_tests/sdn/onos/teston/adapters/connection.py
index dfaa5cc14..a6d192ee5 100644
--- a/functest/opnfv_tests/sdn/onos/teston/adapters/connection.py
+++ b/functest/opnfv_tests/sdn/onos/teston/adapters/connection.py
@@ -64,7 +64,7 @@ class Connection(Foundation):
"""
os.getenv only returns current user value
GetEnvValue returns a environment value of
- current handle
+ current handle
eg: GetEnvValue(handle,'HOME')
"""
envhandle = handle
diff --git a/functest/opnfv_tests/sdn/onos/teston/adapters/environment.py b/functest/opnfv_tests/sdn/onos/teston/adapters/environment.py
index cb75b5c3c..875a2dc9b 100644
--- a/functest/opnfv_tests/sdn/onos/teston/adapters/environment.py
+++ b/functest/opnfv_tests/sdn/onos/teston/adapters/environment.py
@@ -1,11 +1,11 @@
"""
Description:
- This file is used to setup the running environment
- Include Download code,setup environment variable
- Set onos running config
- Set user name/password
- Onos-push-keys and so on
- lanqinglong@huawei.com
+This file is used to setup the running environment
+Include Download code,setup environment variable
+Set onos running config
+Set user name/password
+Onos-push-keys and so on
+lanqinglong@huawei.com
#
# All rights reserved. This program and the accompanying materials
@@ -17,7 +17,7 @@ Description:
import logging
import pexpect
-import pxssh
+from pexpect import pxssh
import re
import os
import sys
@@ -196,10 +196,10 @@ class Environment(Connection):
def ChangeTestCasePara(self, testcase, user, password):
"""
- When running test script, there's something need
- to change in every test folder's *.param & *.topo files
- user: onos&compute node user
- password: onos&compute node password
+ When running test script, there\'s something need
+ to change in every test folder\'s \*.param & \*.topo files
+ user: onos\&compute node user
+ password: onos\&compute node password
"""
self.logger.info("Now Changing " + testcase + " name&password")
if self.masterusername == 'root':
diff --git a/functest/tests/unit/core/test_feature.py b/functest/tests/unit/core/test_feature.py
index 988981eff..553a5dfa4 100644
--- a/functest/tests/unit/core/test_feature.py
+++ b/functest/tests/unit/core/test_feature.py
@@ -22,8 +22,8 @@ class FeatureTestingBase(unittest.TestCase):
_case_name = "foo"
_project_name = "bar"
- _repo = "dir_repo_copper"
- _cmd = "cd /home/opnfv/repos/foo/tests && bash run.sh && cd -"
+ _repo = "dir_repo_bar"
+ _cmd = "cd /home/opnfv/repos/bar/tests && bash run.sh && cd -"
_output_file = '/home/opnfv/functest/results/foo.log'
feature = None
diff --git a/functest/tests/unit/openstack/tempest/test_conf_utils.py b/functest/tests/unit/openstack/tempest/test_conf_utils.py
index 379049653..79ef99150 100644
--- a/functest/tests/unit/openstack/tempest/test_conf_utils.py
+++ b/functest/tests/unit/openstack/tempest/test_conf_utils.py
@@ -261,8 +261,11 @@ class OSTempestConfUtilsTesting(unittest.TestCase):
'write') as mwrite, \
mock.patch('__builtin__.open', mock.mock_open()), \
mock.patch('functest.opnfv_tests.openstack.tempest.'
- 'conf_utils.backup_tempest_config'):
+ 'conf_utils.backup_tempest_config'), \
+ mock.patch('functest.utils.functest_utils.yaml.safe_load') \
+ as mock_yaml:
CONST.__setattr__('OS_ENDPOINT_TYPE', None)
+ mock_yaml.return_value = mock.Mock()
conf_utils.\
configure_tempest_update_params('test_conf_file',
IMAGE_ID=image_id,
diff --git a/functest/tests/unit/vnf/ims/test_cloudify_ims.py b/functest/tests/unit/vnf/ims/test_cloudify_ims.py
index 537c5146b..f0483c69f 100644
--- a/functest/tests/unit/vnf/ims/test_cloudify_ims.py
+++ b/functest/tests/unit/vnf/ims/test_cloudify_ims.py
@@ -13,6 +13,8 @@ import mock
from functest.core import vnf
from functest.opnfv_tests.vnf.ims import cloudify_ims
+from snaps.openstack.os_credentials import OSCreds
+
class CloudifyImsTesting(unittest.TestCase):
@@ -79,8 +81,11 @@ class CloudifyImsTesting(unittest.TestCase):
@mock.patch('snaps.openstack.create_image.OpenStackImage.create')
def test_prepare_bad_auth_url(self, *args):
with self.assertRaises(Exception):
- self.ims_vnf.prepare()
- args[0].assert_not_called()
+ self.ims_vnf.image_creator(
+ OSCreds(username='user', password='pass', auth_url='url',
+ project_name='project', identity_api_version=3),
+ mock.Mock())
+ args[0].assert_not_called()
def test_prepare_missing_param(self):
with self.assertRaises(vnf.VnfPreparationException):
diff --git a/functest/tests/unit/vnf/ims/test_orchestra_ims.py b/functest/tests/unit/vnf/ims/test_orchestra_ims.py
index 219997301..5a1efc7fd 100644
--- a/functest/tests/unit/vnf/ims/test_orchestra_ims.py
+++ b/functest/tests/unit/vnf/ims/test_orchestra_ims.py
@@ -154,7 +154,7 @@ class OrchestraImsTesting(unittest.TestCase):
"""Testing prepare function with bad auth url"""
with self.assertRaises(Exception):
self.ims_vnf.prepare()
- args[0].assert_not_called()
+ args[0].assert_not_called()
def test_prepare_missing_param(self):
"""Testing prepare function with missing param"""
diff --git a/functest/tests/unit/vnf/rnc/__init__.py b/functest/tests/unit/vnf/rnc/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/functest/tests/unit/vnf/rnc/__init__.py
+++ /dev/null