From b33fc07ea2cfd7c4bad0dd404ad0cb45dbb476df Mon Sep 17 00:00:00 2001 From: Georg Kunz Date: Sun, 1 Apr 2018 11:35:09 +0200 Subject: API validaton exemption for Danube-based release This patch adds the ability to Dovetail to disable strict API response validation in Tempest-based test cases run by Functest. This is a backport of the changes from master, targeting OVP 1.0.1 Corresponding updates of the web portal 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 99845484..05c63eb7 100644 --- a/dovetail/testcase.py +++ b/dovetail/testcase.py @@ -290,6 +290,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'], + 'patch', + '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