summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
Diffstat (limited to 'ci')
-rw-r--r--ci/config_functest.yaml16
-rw-r--r--ci/config_patch.yaml9
-rwxr-xr-xci/exec_test.sh5
-rwxr-xr-xci/prepare_env.py24
4 files changed, 35 insertions, 19 deletions
diff --git a/ci/config_functest.yaml b/ci/config_functest.yaml
index fb4103d34..8e45b1d27 100644
--- a/ci/config_functest.yaml
+++ b/ci/config_functest.yaml
@@ -176,22 +176,6 @@ promise:
subnet_cidr: 192.168.121.0/24
router_name: promise-router
-parser:
- general:
- tenant_name: parser
- tenant_description: parser Functionality Testing
- user_name: parser
- user_pwd: parser
- image_name: parser-img
- flavor_name: parser-flavor
- flavor_vcpus: 1
- flavor_ram: 512
- flavor_disk: 0
- network_name: parser-net
- subnet_name: parser-subnet
- subnet_cidr: 192.168.160.0/24
- router_name: parser-router
-
example:
example_vm_name: example-vm
example_flavor: m1.small
diff --git a/ci/config_patch.yaml b/ci/config_patch.yaml
new file mode 100644
index 000000000..467a83ca0
--- /dev/null
+++ b/ci/config_patch.yaml
@@ -0,0 +1,9 @@
+lxd:
+ general:
+ openstack:
+ image_name: Cirros-0.3.4
+ image_file_name: cirros-0.3.4-x86_64-lxc.tar.gz
+ image_disk_format: raw
+
+ healthcheck:
+ disk_image: /home/opnfv/functest/data/cirros-0.3.4-x86_64-lxc.tar.gz
diff --git a/ci/exec_test.sh b/ci/exec_test.sh
index ddbe486f1..9951c0973 100755
--- a/ci/exec_test.sh
+++ b/ci/exec_test.sh
@@ -150,9 +150,10 @@ function run_test(){
${repos_dir}/moon/tests/run_tests.sh
;;
"multisite")
- python ${FUNCTEST_REPO_DIR}/testcases/features/multisite.py
+ python ${FUNCTEST_REPO_DIR}/testcases/OpenStack/tempest/gen_tempest_conf.py
python ${FUNCTEST_REPO_DIR}/testcases/OpenStack/tempest/run_tempest.py \
$clean_flag -s -m feature_multisite $report
+ -c ${FUNCTEST_REPO_DIR}/testcases/OpenStack/tempest/tempest_multisite.conf
;;
"domino")
python ${FUNCTEST_REPO_DIR}/testcases/features/domino.py
@@ -172,7 +173,7 @@ function run_test(){
python ${FUNCTEST_REPO_DIR}/testcases/features/sfc/sfc.py
;;
"parser")
- python ${FUNCTEST_REPO_DIR}/testcases/vnf/RNC/parser.py
+ python ${FUNCTEST_REPO_DIR}/testcases/vnf/vRNC/parser.py $report
;;
*)
echo "The test case '${test_name}' does not exist."
diff --git a/ci/prepare_env.py b/ci/prepare_env.py
index e31afd495..116b1a6e2 100755
--- a/ci/prepare_env.py
+++ b/ci/prepare_env.py
@@ -46,10 +46,16 @@ CI_SCENARIO = ""
CI_DEBUG = False
REPOS_DIR = os.getenv('repos_dir')
FUNCTEST_REPO = REPOS_DIR + '/functest/'
+CONFIG_FUNCTEST_PATH = os.environ["CONFIG_FUNCTEST_YAML"]
+CONFIG_PATCH_PATH = os.path.join(os.path.dirname(
+ CONFIG_FUNCTEST_PATH), "config_patch.yaml")
-with open(os.environ["CONFIG_FUNCTEST_YAML"]) as f:
+with open(CONFIG_FUNCTEST_PATH) as f:
functest_yaml = yaml.safe_load(f)
+with open(CONFIG_PATCH_PATH) as f:
+ functest_patch_yaml = yaml.safe_load(f)
+
FUNCTEST_CONF_DIR = functest_yaml.get("general").get(
"directories").get("dir_functest_conf")
@@ -183,6 +189,21 @@ def source_rc_file():
logger.debug("Used credentials: %s" % str)
+def patch_config_file():
+ updated = False
+ for key in functest_patch_yaml:
+ if key in CI_SCENARIO:
+ new_functest_yaml = dict(ft_utils.merge_dicts(
+ functest_yaml, functest_patch_yaml[key]))
+ updated = True
+
+ if updated:
+ os.remove(CONFIG_FUNCTEST_PATH)
+ with open(CONFIG_FUNCTEST_PATH, "w") as f:
+ f.write(yaml.dump(new_functest_yaml, default_style='"'))
+ f.close()
+
+
def verify_deployment():
print_separator()
logger.info("Verifying OpenStack services...")
@@ -262,6 +283,7 @@ def main():
check_env_variables()
create_directories()
source_rc_file()
+ patch_config_file()
verify_deployment()
install_rally()