summaryrefslogtreecommitdiffstats
path: root/dovetail/test_runner.py
diff options
context:
space:
mode:
authorMatthewLi <matthew.lijun@huawei.com>2017-05-26 02:35:03 -0400
committerMatthewLi <matthew.lijun@huawei.com>2017-05-30 23:02:30 -0400
commitab4226ed3c39b8d7b759e93e05e27f1247763ec9 (patch)
tree91702ad2575f582a8fcaaa1143748c19cbd64308 /dovetail/test_runner.py
parented7f8ee3697be3751dc6cfb243cc55092ddd1dd5 (diff)
sdnvpn offline support in dovetail
JIRA: DOVETAIL-441 Change-Id: I709c62a36c65ef0b4da69c5508f7a8273e68dc2b Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
Diffstat (limited to 'dovetail/test_runner.py')
-rw-r--r--dovetail/test_runner.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/dovetail/test_runner.py b/dovetail/test_runner.py
index cbc7e2d3..6ae410c1 100644
--- a/dovetail/test_runner.py
+++ b/dovetail/test_runner.py
@@ -49,13 +49,22 @@ class DockerRunner(object):
if dt_cfg.dovetail_config['offline']:
exist = Container.check_image_exist(self.testcase.validate_type())
if not exist:
- self.logger.error('%s image not exist offline running',
+ self.logger.error('%s image not exist when running offline',
self.testcase.validate_type())
return
else:
if not Container.pull_image(self.testcase.validate_type()):
self.logger.error("Failed to pull the image.")
return
+ # for sdnvpn, there is a need to download needed images to config_dir
+ # in dovetail_config.yml first.
+ if 'sdnvpn' in str(self.testcase.name()):
+ img_name = dt_cfg.dovetail_config['sdnvpn_image']
+ img_file = os.path.join(dt_cfg.dovetail_config['config_dir'],
+ img_name)
+ if not os.path.isfile(img_file):
+ self.logger.error('image %s not found', img_name)
+ return
container_id = Container.create(self.testcase.validate_type(),
self.testcase.name())
if not container_id: