summaryrefslogtreecommitdiffstats
path: root/testcases/vPing
diff options
context:
space:
mode:
authorboucherv <valentin.boucher@orange.com>2015-10-28 10:07:04 +0100
committerboucherv <valentin.boucher@orange.com>2015-10-28 12:03:54 +0100
commit11d8d4904b5346c8ca904e4a3723ddf5ba5bad8c (patch)
tree8665bf70446b5d94b3b8a8bf606beabb71e42570 /testcases/vPing
parent6c22017400294fa017a28de00e6cc756db2d450f (diff)
vIMS test integration and move "push_results_to_db" method
Move "push_results_to_db" method to functest_util Updated some files for clearwater vIMS functional testing Change-Id: I21628b063470963e4e4425a0f89fefa33494e40d Signed-off-by: boucherv <valentin.boucher@orange.com>
Diffstat (limited to 'testcases/vPing')
-rw-r--r--testcases/vPing/CI/libraries/vPing.py22
1 files changed, 4 insertions, 18 deletions
diff --git a/testcases/vPing/CI/libraries/vPing.py b/testcases/vPing/CI/libraries/vPing.py
index b51bb6287..14671b66d 100644
--- a/testcases/vPing/CI/libraries/vPing.py
+++ b/testcases/vPing/CI/libraries/vPing.py
@@ -242,22 +242,6 @@ def cleanup(nova, neutron, network_dic):
"Network '%s' deleted successfully" % NEUTRON_PRIVATE_NET_NAME)
return True
-
-def push_results_to_db(payload):
-
- url = TEST_DB + "/results"
- installer = functest_utils.get_installer_type(logger)
- git_version = functest_utils.get_git_branch(args.repo_path)
- # TODO pod_name hardcoded, info shall come from Jenkins
- params = {"project_name": "functest", "case_name": "vPing",
- "pod_name": "opnfv-jump-2", "installer": installer,
- "version": git_version, "details": payload}
-
- headers = {'Content-Type': 'application/json'}
- r = requests.post(url, data=json.dumps(params), headers=headers)
- logger.debug(r)
-
-
def main():
creds_nova = functest_utils.get_credentials("nova")
@@ -437,8 +421,10 @@ def main():
if args.report:
logger.debug("Push result into DB")
# TODO check path result for the file
- push_results_to_db(
- {'timestart': start_time_ts, 'duration': duration,
+ git_version = functest_utils.get_git_branch(args.repo_path)
+ functest_utils.push_results_to_db(db_url=TEST_DB, case_name="vPing",
+ logger=logger, pod_name="opnfv-jump-2", git_version=git_version,
+ payload={'timestart': start_time_ts, 'duration': duration,
'status': test_status})
# with open("vPing-result.json", "w") as outfile:
# json.dump({'timestart': start_time_ts, 'duration': duration,