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/testcase.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'dovetail/testcase.py') diff --git a/dovetail/testcase.py b/dovetail/testcase.py index 86f8061d..866c33b8 100644 --- a/dovetail/testcase.py +++ b/dovetail/testcase.py @@ -289,6 +289,25 @@ class FunctestTestcase(Testcase): super(FunctestTestcase, self).__init__(testcase_yaml) self.type = 'functest' + def prepare_cmd(self, test_type): + if not super(FunctestTestcase, self).prepare_cmd(test_type): + return False + + # if API validation is disabled, append a command for applying a + # patch inside the functest container + if dt_cfg.dovetail_config['no_api_validation']: + patch_cmd = os.path.join( + dt_cfg.dovetail_config['functest']['config']['dir'], + 'patches', + 'functest', + 'disable-api-validation', + 'apply.sh') + self.cmds = [patch_cmd] + self.cmds + self.logger.debug('Updated list of commands for test run with ' + 'disabled API response validation: {}' + .format(self.cmds)) + return True + class YardstickTestcase(Testcase): -- cgit 1.2.3-korg