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 --- dovetail/test_runner.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'dovetail/test_runner.py') diff --git a/dovetail/test_runner.py b/dovetail/test_runner.py index 2fa1eee4..228432a5 100644 --- a/dovetail/test_runner.py +++ b/dovetail/test_runner.py @@ -130,6 +130,8 @@ class DockerRunner(Runner): config_item['debug'] = os.getenv('DEBUG') config_item['build_tag'] = dt_cfg.dovetail_config['build_tag'] config_item['cacert'] = os.getenv('OS_CACERT') + config_item['host_url'] = os.getenv('HOST_URL') + config_item['csar_file'] = os.getenv('CSAR_FILE') return config_item def _update_config(self, testcase, update_pod=True): @@ -274,6 +276,22 @@ class VnftestRunner(DockerRunner): super(VnftestRunner, self).__init__(testcase) +class OnapVtpRunner(DockerRunner): + + config_file_name = 'onap-vtp_config.yml' + + def __init__(self, testcase): + self.type = 'onap-vtp' + super(OnapVtpRunner, self).__init__(testcase) + env_file = os.path.join(dt_cfg.dovetail_config['config_dir'], + dt_cfg.dovetail_config['env_file']) + if not os.path.isfile(env_file): + self.logger.error('File {} does not exist.'.format(env_file)) + return + dt_utils.source_env(env_file) + self._update_config(testcase, update_pod=False) + + class TestRunnerFactory(object): TEST_RUNNER_MAP = { @@ -282,7 +300,8 @@ class TestRunnerFactory(object): "bottlenecks": BottlenecksRunner, "shell": ShellRunner, "vnftest": VnftestRunner, - "functest-k8s": FunctestK8sRunner + "functest-k8s": FunctestK8sRunner, + "onap-vtp": OnapVtpRunner } @classmethod -- cgit 1.2.3-korg