diff options
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 |