diff options
author | xudan <xudan16@huawei.com> | 2018-11-24 01:44:02 -0500 |
---|---|---|
committer | xudan <xudan16@huawei.com> | 2019-01-03 22:15:40 -0500 |
commit | b7ee5abe9b73cbc0928bf9ac080a6aecf05bcb7e (patch) | |
tree | 6825cc66028c7c085364a5cedd727cddc93b5b49 /dovetail/test_runner.py | |
parent | 78b0062ce9dc4d23b967112a0896f12cc6526e1c (diff) |
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 <xudan16@huawei.com>
Diffstat (limited to 'dovetail/test_runner.py')
-rw-r--r-- | dovetail/test_runner.py | 21 |
1 files changed, 20 insertions, 1 deletions
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 |