aboutsummaryrefslogtreecommitdiffstats
path: root/functest/ci
diff options
context:
space:
mode:
Diffstat (limited to 'functest/ci')
-rwxr-xr-xfunctest/ci/config_functest.yaml3
-rwxr-xr-xfunctest/ci/prepare_env.py53
-rwxr-xr-xfunctest/ci/run_tests.py2
-rwxr-xr-xfunctest/ci/testcases.yaml62
-rwxr-xr-xfunctest/ci/tier_builder.py2
-rwxr-xr-xfunctest/ci/tier_handler.py6
6 files changed, 73 insertions, 55 deletions
diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml
index 3bad1b8f0..7beb9d4bd 100755
--- a/functest/ci/config_functest.yaml
+++ b/functest/ci/config_functest.yaml
@@ -45,6 +45,8 @@ general:
image_name: Cirros-0.3.4
image_file_name: cirros-0.3.4-x86_64-disk.img
image_disk_format: qcow2
+ image_username: cirros
+ image_password: cubswin:)
flavor_name: opnfv_flavor
flavor_ram: 512
@@ -131,6 +133,7 @@ vnf:
orchestra_ims:
tenant_name: orchestra_ims
tenant_description: ims deployed with openbaton
+ config: orchestra_ims.yaml
opera_ims:
tenant_name: opera_ims
tenant_description: ims deployed with open-o
diff --git a/functest/ci/prepare_env.py b/functest/ci/prepare_env.py
index 4b9c8201a..5a9f99cb6 100755
--- a/functest/ci/prepare_env.py
+++ b/functest/ci/prepare_env.py
@@ -1,18 +1,11 @@
#!/usr/bin/env python
#
-# Author: Jose Lausuch (jose.lausuch@ericsson.com)
-#
-# Installs the Functest framework within the Docker container
-# and run the tests automatically
-#
-#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
#
-
import argparse
import json
import os
@@ -44,7 +37,7 @@ with open(CONFIG_PATCH_PATH) as f:
functest_patch_yaml = yaml.safe_load(f)
-class PrepareEnvParser():
+class PrepareEnvParser(object):
def __init__(self):
self.parser = argparse.ArgumentParser()
@@ -224,20 +217,19 @@ def install_rally():
"Deployment %s does not exist."
% CONST.rally_deployment_name),
verbose=False)
+
rally_conf = os_utils.get_credentials_for_rally()
with open('rally_conf.json', 'w') as fp:
json.dump(rally_conf, fp)
cmd = ("rally deployment create "
- "--file=rally_conf.json --name={}"
+ "--file=rally_conf.json --name={0}"
.format(CONST.rally_deployment_name))
- ft_utils.execute_command(cmd,
- error_msg=("Problem while creating "
- "Rally deployment"))
+ error_msg = "Problem while creating Rally deployment"
+ ft_utils.execute_command_raise(cmd, error_msg=error_msg)
cmd = "rally deployment check"
- ft_utils.execute_command(cmd,
- error_msg=("OpenStack not responding or "
- "faulty Rally deployment."))
+ error_msg = "OpenStack not responding or faulty Rally deployment."
+ ft_utils.execute_command_raise(cmd, error_msg=error_msg)
cmd = "rally deployment list"
ft_utils.execute_command(cmd,
@@ -252,19 +244,30 @@ def install_rally():
def install_tempest():
logger.info("Installing tempest from existing repo...")
- cmd = ("rally verify create-verifier --source {0} "
- "--name {1} --type tempest"
- .format(CONST.dir_repo_tempest, CONST.tempest_deployment_name))
- ft_utils.execute_command(cmd,
- error_msg="Problem while installing Tempest.")
+ cmd = ("rally verify list-verifiers | "
+ "grep '{0}' | wc -l".format(CONST.tempest_deployment_name))
+ p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
+ while p.poll() is None:
+ line = p.stdout.readline().rstrip()
+ if str(line) == '0':
+ logger.debug("Tempest %s does not exist" %
+ CONST.tempest_deployment_name)
+ cmd = ("rally verify create-verifier --source {0} "
+ "--name {1} --type tempest"
+ .format(CONST.dir_repo_tempest,
+ CONST.tempest_deployment_name))
+ error_msg = "Problem while installing Tempest."
+ ft_utils.execute_command_raise(cmd, error_msg=error_msg)
def create_flavor():
- os_utils.get_or_create_flavor('m1.tiny',
- '512',
- '1',
- '1',
- public=True)
+ _, flavor_id = os_utils.get_or_create_flavor('m1.tiny',
+ '512',
+ '1',
+ '1',
+ public=True)
+ if flavor_id is None:
+ raise Exception('Failed to create flavor')
def check_environment():
diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py
index 93518de0b..f920e70d8 100755
--- a/functest/ci/run_tests.py
+++ b/functest/ci/run_tests.py
@@ -48,7 +48,7 @@ class BlockingTestFailed(Exception):
pass
-class RunTestsParser():
+class RunTestsParser(object):
def __init__(self):
self.parser = argparse.ArgumentParser()
diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml
index a2633fcfc..009f9b79d 100755
--- a/functest/ci/testcases.yaml
+++ b/functest/ci/testcases.yaml
@@ -366,38 +366,50 @@ tiers:
-
name: components
order: 3
- ci_loop: 'weekly'
+ ci_loop: 'daily'
description : >-
Extensive testing of OpenStack API.
testcases:
+# -
+# name: tempest_full_parallel
+# criteria: 'success_rate >= 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'
-
- name: tempest_full_parallel
- criteria: 'success_rate >= 80%'
+ name: tempest_defcore
+ criteria: 'success_rate == 100%'
blocking: false
description: >-
- The list of test cases is generated by
- Tempest automatically and depends on the parameters of
- the OpenStack deplopyment.
+ This is the set of Tempest test cases created by OpenStack
+ Interop Working Group for certification purposes.
dependencies:
- installer: '^((?!netvirt).)*$'
- scenario: ''
+ installer: ''
+ scenario: 'nosdn-nofeature-ha'
run:
module: 'functest.opnfv_tests.openstack.tempest.tempest'
- class: 'TempestFullParallel'
-
- -
- name: rally_full
- criteria: 'success_rate >= 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'
+ class: 'TempestDefcore'
+# -
+# name: rally_full
+# criteria: 'success_rate >= 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'
-
name: vnf
@@ -452,8 +464,8 @@ tiers:
description: >-
VNF deployment with OpenBaton (Orchestra)
dependencies:
- installer: 'unknown'
- scenario: 'unknown'
+ installer: ''
+ scenario: ''
run:
module: 'functest.opnfv_tests.vnf.ims.orchestra_ims'
class: 'ImsVnf'
diff --git a/functest/ci/tier_builder.py b/functest/ci/tier_builder.py
index e1c3e49e6..dae7c73e8 100755
--- a/functest/ci/tier_builder.py
+++ b/functest/ci/tier_builder.py
@@ -11,7 +11,7 @@ import tier_handler as th
import yaml
-class TierBuilder:
+class TierBuilder(object):
def __init__(self, ci_installer, ci_scenario, testcases_file):
self.ci_installer = ci_installer
diff --git a/functest/ci/tier_handler.py b/functest/ci/tier_handler.py
index 1eadfba50..127986bf3 100755
--- a/functest/ci/tier_handler.py
+++ b/functest/ci/tier_handler.py
@@ -28,7 +28,7 @@ def split_text(text, max_len):
return lines
-class Tier:
+class Tier(object):
def __init__(self, name, order, ci_loop, description=""):
self.tests_array = []
@@ -102,7 +102,7 @@ class Tier:
return out
-class TestCase:
+class TestCase(object):
def __init__(self, name, dependency, criteria, blocking, description=""):
self.name = name
@@ -160,7 +160,7 @@ class TestCase:
return out
-class Dependency:
+class Dependency(object):
def __init__(self, installer, scenario):
self.installer = installer