summaryrefslogtreecommitdiffstats
path: root/dovetail/testcase.py
diff options
context:
space:
mode:
authorGeorg Kunz <georg.kunz@ericsson.com>2018-04-01 11:35:09 +0200
committerGeorg Kunz <georg.kunz@ericsson.com>2018-04-17 19:14:14 +0000
commit749946dcc5b17cfca43c6e8692359f4972e48b21 (patch)
treebbfb42c881e4e2cb5947b6fb15e0b0fa095651c7 /dovetail/testcase.py
parent71ba21ff906d4104a81442d4712aac13cf4906d4 (diff)
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 <georg.kunz@ericsson.com>
Diffstat (limited to 'dovetail/testcase.py')
-rw-r--r--dovetail/testcase.py19
1 files changed, 19 insertions, 0 deletions
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):