diff options
author | SerenaFeng <feng.xiaowei@zte.com.cn> | 2016-11-21 18:52:07 +0800 |
---|---|---|
committer | SerenaFeng <feng.xiaowei@zte.com.cn> | 2016-11-21 18:52:07 +0800 |
commit | f34671d65a83fa1228199a157493f4603d20cb79 (patch) | |
tree | ad412b9920f771da8b55e5497ea76f5c270498ef | |
parent | 3fe85ce6a6a19e5906e325370e6e6db16ec9d41e (diff) |
push test results to qtip dashboard server
JIRA: QTIP-166
Change-Id: Ic9b06c5dc0065850f8d766ecb66b74835b8677df
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
-rw-r--r-- | qtip/utils/dashboard/pushtoDB.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/qtip/utils/dashboard/pushtoDB.py b/qtip/utils/dashboard/pushtoDB.py index b901f542..427d39c4 100644 --- a/qtip/utils/dashboard/pushtoDB.py +++ b/qtip/utils/dashboard/pushtoDB.py @@ -28,6 +28,14 @@ def push_results_to_db(db_url, case_name, payload, installer, pod_name): logger.info('pod_name:{0},installer:{1},creation_data:{2}'.format(pod_name, installer, creation_date)) + # temporary code, will be deleted after Bigergia dashboard is ready + try: + qtip_testapi_url = "http://testapi.qtip.openzero.net/results" + qtip_testapi_r = requests.post(qtip_testapi_url, data=json.dumps(params), headers=headers) + logger.info('Pushing Results to qtip_testapi: %s'.format(qtip_testapi_r)) + except: + logger.info("Pushing Results to qtip_testapi Error:{0}".format(sys.exc_info()[0])) + try: r = requests.post(url, data=json.dumps(params), headers=headers) logger.info(r) |