From b7ee5abe9b73cbc0928bf9ac080a6aecf05bcb7e Mon Sep 17 00:00:00 2001 From: xudan Date: Sat, 24 Nov 2018 01:44:02 -0500 Subject: Add ONAP VNF SDK verification tests Please refer to env_config.sh.onap.sample when testing it. The guide of preparing local env for onap package validation can be found here https://gerrit.onap.org/r/#/c/75119 Change-Id: I39d6b11544847756126623a7eb3b953dc800c470 Signed-off-by: xudan --- etc/conf/onap-vtp_config.yml | 25 +++++++++++++++++++++++++ etc/testcase/onap-vtp.validate.csar.yml | 14 ++++++++++++++ etc/userconfig/env_config.sh.onap.sample | 4 ++++ 3 files changed, 43 insertions(+) create mode 100644 etc/conf/onap-vtp_config.yml create mode 100644 etc/testcase/onap-vtp.validate.csar.yml create mode 100644 etc/userconfig/env_config.sh.onap.sample (limited to 'etc') diff --git a/etc/conf/onap-vtp_config.yml b/etc/conf/onap-vtp_config.yml new file mode 100644 index 00000000..85944c3b --- /dev/null +++ b/etc/conf/onap-vtp_config.yml @@ -0,0 +1,25 @@ +--- + +{% set validate_testcase = validate_testcase or '' %} +{% set testcase = testcase or '' %} +{% set build_tag = build_tag or '' %} +{% set csar_file = csar_file or '' %} +{% set host_url = host_url or '' %} +{% set result_dir = '/tmp/onap' %} + +onap-vtp: + image_name: nexus3.onap.org:10001/onap/cli + docker_tag: 2.0.5 + opts: '-td ' + envs: '-e OPEN_CLI_MODE=daemon -e BUILD_TAG={{build_tag}}-{{testcase}} + -e OPEN_CLI_PRODUCT_IN_USE=onap-vtp' + volumes: + - '-v {{dovetail_home}}/pre_config/{{csar_file}}:/{{csar_file}}' + - '-v {{dovetail_home}}/results:{{result_dir}}' + pre_condition: + - 'echo this is pre_condition' + cmds: + - "oclip vnftest-run --name {{validate_testcase}} --param csar=/{{csar_file}} + --host-url {{host_url}} --format json > {{result_dir}}/{{testcase}}.out" + post_condition: + - 'echo this is post_condition' diff --git a/etc/testcase/onap-vtp.validate.csar.yml b/etc/testcase/onap-vtp.validate.csar.yml new file mode 100644 index 00000000..4a9d0ebb --- /dev/null +++ b/etc/testcase/onap-vtp.validate.csar.yml @@ -0,0 +1,14 @@ +--- +onap-vtp.validate.csar: + name: onap-vtp.validate.csar + objective: onap csar validation + validate: + type: onap-vtp + testcase: csar-validate + report: + source_archive_files: + - onap-vtp.validate.csar.out + dest_archive_files: + - onap-vtp_logs/onap-vtp.validate.csar.out + check_results_file: onap-vtp_logs/onap-vtp.validate.csar.out + sub_testcase_list: diff --git a/etc/userconfig/env_config.sh.onap.sample b/etc/userconfig/env_config.sh.onap.sample new file mode 100644 index 00000000..d983b469 --- /dev/null +++ b/etc/userconfig/env_config.sh.onap.sample @@ -0,0 +1,4 @@ +export HOST_URL="http://:8702" + +# Absolute path of CSAR file, and should be copied to vtp container. +export CSAR_FILE="/opt/test.csar" -- cgit 1.2.3-korg