summaryrefslogtreecommitdiffstats
path: root/testcases/functest_utils.py
diff options
context:
space:
mode:
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 9c618f75a..ed9e36c89 100644
--- a/testcases/functest_utils.py
+++ b/testcases/functest_utils.py
@@ -658,11 +658,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
@@ -677,12 +691,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: