aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/functest_utils.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-01-22 15:17:42 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2016-01-22 15:17:42 +0100
commit59063638116508f7ce4f7612def938bb9eb0e938 (patch)
treefe1dea4f08515b7993cff184b173ae0a43b4d5c3 /testcases/functest_utils.py
parent72cd11c677dda9d68679037484dce30283cd5c99 (diff)
Put scenario in version field on the Test DB (rather that git indication)
Change-Id: I22f7ff3841d7fca637e400d92926d2e1b1755371 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'testcases/functest_utils.py')
-rw-r--r--testcases/functest_utils.py20
1 files changed, 17 insertions, 3 deletions
diff --git a/testcases/functest_utils.py b/testcases/functest_utils.py
index e76ef991b..86b474070 100644
--- a/testcases/functest_utils.py
+++ b/testcases/functest_utils.py
@@ -652,11 +652,25 @@ def get_installer_type(logger=None):
except KeyError:
if logger:
logger.error("Impossible to retrieve the installer type")
- installer = "Unkown"
+ installer = "Unknown_installer"
return installer
+def get_scenario(logger=None):
+ """
+ Get scenario
+ """
+ try:
+ scenario = os.environ['DEPLOY_SCENARIO']
+ except KeyError:
+ if logger:
+ logger.error("Impossible to retrieve the scenario")
+ scenario = "Unknown_scenario"
+
+ return scenario
+
+
def get_pod_name(logger=None):
"""
Get PoD Name from env variable NODE_NAME
@@ -671,12 +685,12 @@ def get_pod_name(logger=None):
def push_results_to_db(db_url, case_name, logger, pod_name,
- git_version, payload):
+ version, payload):
url = db_url + "/results"
installer = get_installer_type(logger)
params = {"project_name": "functest", "case_name": case_name,
"pod_name": pod_name, "installer": installer,
- "version": git_version, "details": payload}
+ "version": version, "details": payload}
headers = {'Content-Type': 'application/json'}
try: