diff options
author | Stamatis Katsaounis <mokats@intracom-telecom.com> | 2018-11-14 15:20:12 +0200 |
---|---|---|
committer | Stamatis Katsaounis <mokats@intracom-telecom.com> | 2018-11-14 14:38:44 +0000 |
commit | 4ef204b5156b31bc2beae614765d53d9dcf5ea16 (patch) | |
tree | a2c43649c1f64d7b81c782ca983816e7de120f98 /dovetail/test_runner.py | |
parent | 0dcbbad4df170f16d4bcf20c752a45dd889a094f (diff) |
Add missing unit tests for test_runner file
JIRA: DOVETAIL-724
This patch adds unit tests for Runners classes methods of Dovetail
which were missing.
Change-Id: Ib985a44db86be02a7b9cefb8deca187bb50e78cc
Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
Diffstat (limited to 'dovetail/test_runner.py')
-rw-r--r-- | dovetail/test_runner.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/dovetail/test_runner.py b/dovetail/test_runner.py index 95bed6f9..8932ad89 100644 --- a/dovetail/test_runner.py +++ b/dovetail/test_runner.py @@ -74,9 +74,9 @@ class DockerRunner(object): self.logger.debug('container id: {}'.format(container_id)) - dest_path = self.testcase.pre_copy_path("dest_path") - src_file_name = self.testcase.pre_copy_path("src_file") - exist_file_name = self.testcase.pre_copy_path("exist_src_file") + dest_path = self.testcase.pre_copy_path('dest_path') + src_file_name = self.testcase.pre_copy_path('src_file') + exist_file_name = self.testcase.pre_copy_path('exist_src_file') if src_file_name or exist_file_name: if not self.pre_copy(container, dest_path, src_file_name, @@ -88,7 +88,7 @@ class DockerRunner(object): for cmd in cmds: ret, msg = container.exec_cmd(cmd) if ret != 0: - self.logger.error("Failed to exec all pre_condition cmds.") + self.logger.error('Failed to exec all pre_condition cmds.') break if not self.testcase.prepare_cmd(self.type): @@ -105,13 +105,13 @@ class DockerRunner(object): cmds = self.testcase.post_condition() if cmds: for cmd in cmds: - ret, msg = container.exec_cmd(cmd) + container.exec_cmd(cmd) if not dt_cfg.dovetail_config['noclean']: container.clean() def archive_logs(self): - result_path = os.path.join(os.environ["DOVETAIL_HOME"], 'results') + result_path = os.path.join(os.environ['DOVETAIL_HOME'], 'results') src_files = dt_utils.get_value_from_dict( 'report.source_archive_files', self.testcase.testcase) dest_files = dt_utils.get_value_from_dict( @@ -144,10 +144,10 @@ class DockerRunner(object): config_item = {} config_item['validate_testcase'] = testcase.validate_testcase() config_item['testcase'] = testcase.name() - config_item['os_insecure'] = os.getenv("OS_INSECURE") + config_item['os_insecure'] = os.getenv('OS_INSECURE') if 'DEPLOY_SCENARIO' in os.environ: config_item['deploy_scenario'] = os.environ['DEPLOY_SCENARIO'] - config_item['dovetail_home'] = os.getenv("DOVETAIL_HOME") + config_item['dovetail_home'] = os.getenv('DOVETAIL_HOME') return config_item def _update_config(self, testcase): |