summaryrefslogtreecommitdiffstats
path: root/dovetail/container.py
diff options
context:
space:
mode:
Diffstat (limited to 'dovetail/container.py')
-rw-r--r--dovetail/container.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/dovetail/container.py b/dovetail/container.py
index f7912d58..3b040ca9 100644
--- a/dovetail/container.py
+++ b/dovetail/container.py
@@ -63,8 +63,8 @@ class Container(object):
# These are all just used by Functest's function push_results_to_db.
# And has nothing to do with DoveTail running test cases.
- ins_type = " -e INSTALLER_TYPE=vendor-specific"
- scenario = " -e DEPLOY_SCENARIO=default"
+ ins_type = " -e INSTALLER_TYPE=unknown"
+ scenario = " -e DEPLOY_SCENARIO=unknown"
node = " -e NODE_NAME=master"
envs = "%s %s %s" % (ins_type, scenario, node)
@@ -72,8 +72,9 @@ class Container(object):
if dovetail_config['report_dest'].startswith("http"):
report = " -e TEST_DB_URL=%s " % dovetail_config['report_dest']
if dovetail_config['report_dest'] == "file":
- file_path = dovetail_config["functest"]['result']['dir']
- file_path = file_path[0:file_path.rfind('/results')]
+ func_res_conf = dovetail_config["functest"]['result']
+ file_path = os.path.join(func_res_conf['dir'],
+ func_res_conf['file_path'])
report = " -e TEST_DB_URL=file://%s " % file_path
return "%s %s" % (envs, report)
@@ -99,7 +100,7 @@ class Container(object):
return "%s %s" % (envs, log_vol)
@classmethod
- def create(cls, type):
+ def create(cls, type, testcase_name):
sshkey = "-v /root/.ssh/id_rsa:/root/.ssh/id_rsa "
dovetail_config = dt_cfg.dovetail_config
docker_image = cls.get_docker_image(type)
@@ -113,7 +114,8 @@ class Container(object):
# CI_DEBUG is used for showing the debug logs of the upstream projects
# BUILD_TAG is the unique id for this test
envs = ' -e CI_DEBUG=true'
- envs = envs + ' -e BUILD_TAG=%s' % dovetail_config['build_tag']
+ envs = envs + ' -e BUILD_TAG=%s-%s' % (dovetail_config['build_tag'],
+ testcase_name)
config = ""
if type.lower() == "functest":