From 749946dcc5b17cfca43c6e8692359f4972e48b21 Mon Sep 17 00:00:00 2001 From: Georg Kunz Date: Sun, 1 Apr 2018 11:35:09 +0200 Subject: Implementation of API validaton exemption in dovetail This patch adds the ability to Dovetail to disable strict API response validation in Tempest-based test cases run by Functest. Corresponding updates of the web portal and backporting of this patch to OVP 1.0.0 (Danube) will follow. JIRA: DOVETAIL-633 Change-Id: Iace99ea1b6224ea907a2c3af8676e9285e6ad3ee Signed-off-by: Georg Kunz --- dovetail/run.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'dovetail/run.py') diff --git a/dovetail/run.py b/dovetail/run.py index 13e365c9..731d84d2 100755 --- a/dovetail/run.py +++ b/dovetail/run.py @@ -220,7 +220,7 @@ def get_result_path(): dt_cfg.dovetail_config['images_dir'] = os.path.join(dovetail_home, 'images') pre_config_path = os.path.join(dovetail_home, 'pre_config') - patch_set_path = os.path.join(dovetail_home, 'patch') + patch_set_path = os.path.join(dovetail_home, 'patches') dt_cfg.dovetail_config['config_dir'] = pre_config_path dt_cfg.dovetail_config['patch_dir'] = patch_set_path return dovetail_home @@ -238,7 +238,7 @@ def copy_patch_files(logger): patch_set_path = dt_cfg.dovetail_config['patch_dir'] if not os.path.isdir(patch_set_path): os.makedirs(patch_set_path) - cmd = 'sudo cp -r %s/* %s' % (constants.PATCH_PATH, patch_set_path) + cmd = 'sudo cp -a -r %s/* %s' % (constants.PATCH_PATH, patch_set_path) dt_utils.exec_cmd(cmd, logger, exit_on_error=False) @@ -303,6 +303,12 @@ def main(*args, **kwargs): else: dt_cfg.dovetail_config['offline'] = False + if kwargs['no_api_validation']: + dt_cfg.dovetail_config['no_api_validation'] = True + logger.warning('Strict API response validation DISABLED.') + else: + dt_cfg.dovetail_config['no_api_validation'] = False + dt_utils.get_hardware_info(logger) origin_testarea = kwargs['testarea'] -- cgit 1.2.3-korg