aboutsummaryrefslogtreecommitdiffstats
path: root/functest/ci
diff options
context:
space:
mode:
Diffstat (limited to 'functest/ci')
-rw-r--r--functest/ci/check_deployment.py22
-rw-r--r--functest/ci/config_functest.yaml9
-rw-r--r--functest/ci/download_images.sh1
-rw-r--r--functest/ci/prepare_env.py9
-rw-r--r--functest/ci/run_tests.py23
-rw-r--r--functest/ci/testcases.yaml54
6 files changed, 44 insertions, 74 deletions
diff --git a/functest/ci/check_deployment.py b/functest/ci/check_deployment.py
index fe20dc8f..e593e17b 100644
--- a/functest/ci/check_deployment.py
+++ b/functest/ci/check_deployment.py
@@ -20,7 +20,6 @@ import logging.config
import os
import pkg_resources
import socket
-import time
from urlparse import urlparse
from snaps.openstack.utils import glance_utils
@@ -34,20 +33,16 @@ __author__ = "Jose Lausuch <jose.lausuch@ericsson.com>"
LOGGER = logging.getLogger(__name__)
-def verify_connectivity(adress, port, timeout=10):
+def verify_connectivity(adress, port):
""" Returns true if an ip/port is reachable"""
connection = socket.socket()
- count = 0
- while count < timeout:
- try:
- connection.connect((adress, port))
- LOGGER.debug('%s:%s is reachable!', adress, port)
- return True
- except socket.error:
- count += 1
- time.sleep(1)
- continue
- LOGGER.error('%s:%s is not reachable.', adress, port)
+ connection.settimeout(10)
+ try:
+ connection.connect((adress, port))
+ LOGGER.debug('%s:%s is reachable!', adress, port)
+ return True
+ except socket.error:
+ LOGGER.error('%s:%s is not reachable.', adress, port)
return False
@@ -159,5 +154,6 @@ def main():
"""Entry point"""
logging.config.fileConfig(pkg_resources.resource_filename(
'functest', 'ci/logging.ini'))
+ logging.captureWarnings(True)
deployment = CheckDeployment()
return deployment.check_all()
diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml
index cfcc728a..575b4478 100644
--- a/functest/ci/config_functest.yaml
+++ b/functest/ci/config_functest.yaml
@@ -110,6 +110,7 @@ odl_sfc:
image_format: qcow2
tempest:
+ unique_names: True
deployment_name: opnfv-tempest
identity:
tenant_name: tempest
@@ -129,11 +130,14 @@ tempest:
volume_device_name: vdc
rally:
+ unique_names: True
deployment_name: opnfv-rally
network_name: rally-net
subnet_name: rally-subnet
subnet_cidr: 192.168.140.0/24
router_name: rally-router
+ flavor_name: rally-tiny
+ flavor_alt_name: rally-mini
vnf:
juju_epc:
@@ -144,6 +148,10 @@ vnf:
tenant_name: cloudify_ims
tenant_description: vIMS
config: cloudify_ims.yaml
+ cloudify_ims_perf:
+ tenant_name: cloudify_ims_perf
+ tenant_description: vIMS
+ config: cloudify_ims_perf.yaml
orchestra_openims:
tenant_name: orchestra_openims
tenant_description: OpenIMS deployed with Open Baton
@@ -192,4 +200,3 @@ energy_recorder:
api_url: http://energy.opnfv.fr/resources
api_user: ""
api_password: ""
-
diff --git a/functest/ci/download_images.sh b/functest/ci/download_images.sh
index 236b763c..09a32848 100644
--- a/functest/ci/download_images.sh
+++ b/functest/ci/download_images.sh
@@ -18,6 +18,7 @@ http://download.cirros-cloud.net/daily/20161201/cirros-d161201-aarch64-kernel
https://cloud-images.ubuntu.com/releases/14.04/release/ubuntu-14.04-server-cloudimg-arm64-uefi1.img
http://cloud.centos.org/altarch/7/images/aarch64/CentOS-7-aarch64-GenericCloud.qcow2.xz
https://sourceforge.net/projects/ool-opnfv/files/vyos-1.1.7.img
+http://marketplace.openbaton.org:8080/api/v1/images/52e2ccc0-1dce-4663-894d-28aab49323aa/img
EOF
xz --decompress --force --keep ${1:-/home/opnfv/functest/images}/CentOS-7-aarch64-GenericCloud.qcow2.xz
diff --git a/functest/ci/prepare_env.py b/functest/ci/prepare_env.py
index a354dbe8..36d04296 100644
--- a/functest/ci/prepare_env.py
+++ b/functest/ci/prepare_env.py
@@ -37,14 +37,14 @@ pod_arch = os.getenv("POD_ARCH", None)
arch_filter = ['aarch64']
CONFIG_FUNCTEST_PATH = pkg_resources.resource_filename(
- 'functest', 'ci/config_functest.yaml')
+ 'functest', 'ci/config_functest.yaml')
CONFIG_PATCH_PATH = pkg_resources.resource_filename(
- 'functest', 'ci/config_patch.yaml')
+ 'functest', 'ci/config_patch.yaml')
CONFIG_AARCH64_PATCH_PATH = pkg_resources.resource_filename(
- 'functest', 'ci/config_aarch64_patch.yaml')
+ 'functest', 'ci/config_aarch64_patch.yaml')
RALLY_CONF_PATH = "/etc/rally/rally.conf"
RALLY_AARCH64_PATCH_PATH = pkg_resources.resource_filename(
- 'functest', 'ci/rally_aarch64_patch.conf')
+ 'functest', 'ci/rally_aarch64_patch.conf')
class PrepareEnvParser(object):
@@ -358,6 +358,7 @@ def prepare_env(**kwargs):
def main():
logging.config.fileConfig(pkg_resources.resource_filename(
'functest', 'ci/logging.ini'))
+ logging.captureWarnings(True)
parser = PrepareEnvParser()
args = parser.parse_args(sys.argv[1:])
return prepare_env(**args)
diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py
index feafa89e..d4acd9c5 100644
--- a/functest/ci/run_tests.py
+++ b/functest/ci/run_tests.py
@@ -124,16 +124,18 @@ class Runner(object):
self.executed_test_cases[test.get_name()] = test_case
if self.clean_flag:
if test_case.create_snapshot() != test_case.EX_OK:
- return result
+ return testcase.TestCase.EX_RUN_ERROR
try:
kwargs = run_dict['args']
- result = test_case.run(**kwargs)
+ test_case.run(**kwargs)
except KeyError:
- result = test_case.run()
- if result == testcase.TestCase.EX_OK:
- if self.report_flag:
- test_case.push_to_db()
+ test_case.run()
+ if self.report_flag:
+ test_case.push_to_db()
+ if test.get_project() == "functest":
result = test_case.is_successful()
+ else:
+ result = testcase.TestCase.EX_OK
logger.info("Test result:\n\n%s\n", test_case)
if self.clean_flag:
test_case.clean()
@@ -157,10 +159,12 @@ class Runner(object):
else:
logger.info("Running tier '%s'" % tier_name)
for test in tests:
- result = self.run_test(test)
- if result != testcase.TestCase.EX_OK:
+ self.run_test(test)
+ test_case = self.executed_test_cases[test.get_name()]
+ if test_case.is_successful() != testcase.TestCase.EX_OK:
logger.error("The test case '%s' failed.", test.get_name())
- self.overall_result = Result.EX_ERROR
+ if test.get_project() == "functest":
+ self.overall_result = Result.EX_ERROR
if test.is_blocking():
raise BlockingTestFailed(
"The test case {} failed and is blocking".format(
@@ -264,6 +268,7 @@ class Runner(object):
def main():
logging.config.fileConfig(pkg_resources.resource_filename(
'functest', 'ci/logging.ini'))
+ logging.captureWarnings(True)
parser = RunTestsParser()
args = parser.parse_args(sys.argv[1:])
runner = Runner()
diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml
index 0dce47e3..5c77f846 100644
--- a/functest/ci/testcases.yaml
+++ b/functest/ci/testcases.yaml
@@ -38,7 +38,7 @@ tiers:
the cloud's private network.
dependencies:
installer: '^((?!netvirt).)*$'
- scenario: ''
+ scenario: '^((?!lxd).)*$'
run:
module: 'functest.opnfv_tests.openstack.snaps.api_check'
class: 'ApiCheck'
@@ -243,8 +243,8 @@ tiers:
description: >-
Test suite from Promise project.
dependencies:
- installer: '(fuel)|(joid)'
- scenario: ''
+ installer: 'joid'
+ scenario: 'ocl-nofeature'
run:
module: 'functest.core.feature'
class: 'BashFeature'
@@ -253,20 +253,19 @@ tiers:
-
case_name: doctor-notification
- enabled: false
project_name: doctor
criteria: 100
blocking: false
description: >-
Test suite from Doctor project.
dependencies:
- installer: '(apex)|(fuel)'
+ installer: 'apex'
scenario: '^((?!fdio).)*$'
run:
module: 'functest.core.feature'
class: 'BashFeature'
args:
- cmd: '(cd /src/doctor-test/tests && run.sh)'
+ cmd: 'doctor-test'
-
case_name: bgpvpn
@@ -285,25 +284,7 @@ tiers:
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: true
project_name: sfc
criteria: 100
blocking: false
@@ -319,25 +300,7 @@ tiers:
cmd: 'run_sfc_tests.py'
-
- case_name: parser-basics
- enabled: false
- project_name: parser
- criteria: 100
- blocking: false
- description: >-
- Test suite from Parser project.
- dependencies:
- installer: 'fuel'
- scenario: '^((?!bgpvpn|noha).)*$'
- run:
- module: 'functest.core.feature'
- class: 'BashFeature'
- args:
- cmd: 'cd /home/opnfv/repos/parser/tests && ./functest_run.sh'
-
- -
case_name: domino-multinode
- enabled: false
project_name: domino
criteria: 100
blocking: false
@@ -354,7 +317,6 @@ tiers:
-
case_name: barometercollectd
- enabled: true
project_name: barometer
criteria: 100
blocking: false
@@ -448,8 +410,7 @@ tiers:
class: 'CloudifyIms'
-
case_name: orchestra_openims
- project_name: functest
- enabled: false
+ project_name: orchestra
criteria: 100
blocking: false
description: >-
@@ -463,8 +424,7 @@ tiers:
-
case_name: orchestra_clearwaterims
- project_name: functest
- enabled: false
+ project_name: orchestra
criteria: 100
blocking: false
description: >-