summaryrefslogtreecommitdiffstats
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 14:50:26 +0000
commit74118a6d8295c60772b2aba8907e06d691143214 (patch)
treefe1dea4f08515b7993cff184b173ae0a43b4d5c3 /testcases/functest_utils.py
parentb5a40830c4945dcf6809773bd099e819a3857ec3 (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> (cherry picked from commit 59063638116508f7ce4f7612def938bb9eb0e938)
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: