aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard
diff options
context:
space:
mode:
authorMofassirArif <Mofassir_Arif@dellteam.com>2016-01-21 06:42:23 -0800
committerNauman Ahad <nauman.ahad@xflowresearch.com>2016-02-01 22:27:40 +0000
commit30f974a996efbb4b7f7b4fc3a47a1454c3fe80e5 (patch)
treeee1d930fca39fa6875de6e18a2ae3dd9dba6f70f /dashboard
parentc013d5c523c42221f2c3594f0a751e9181b80a6b (diff)
bug fix: result collection bug fix for docker images
Change-Id: Ia4ea09b90c7a4f4e3699af456c6d66e85661cc0b Signed-off-by: MofassirArif <Mofassir_Arif@dellteam.com> (cherry picked from commit 971a7c98515a9d83661f5e423f7e8390f35dca59)
Diffstat (limited to 'dashboard')
-rw-r--r--dashboard/pushtoDB.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/dashboard/pushtoDB.py b/dashboard/pushtoDB.py
index d056c18b..44602628 100644
--- a/dashboard/pushtoDB.py
+++ b/dashboard/pushtoDB.py
@@ -19,7 +19,9 @@ def push_results_to_db(db_url, case_name, payload,logger=None, pod_name="dell-us
"version": "test" , "details": payload}
headers = {'Content-Type': 'application/json'}
- print json.dumps(params)
+ print pod_name
+ print installer
+ print creation_date
try:
r = requests.post(url, data=json.dumps(params), headers=headers)
@@ -41,10 +43,15 @@ def main():
global payload_list
populate_payload(suite_list)
- for suite,case in payload_list.items():
- with open('results/'+suite,'r') as result_file:
- j=json.load(result_file)
- push_results_to_db(TEST_DB, case , j)
+ if payload_list:
+ print payload_list
+ for suite,case in payload_list.items():
+ with open('results/'+suite,'r') as result_file:
+ j=json.load(result_file)
+ push_results_to_db(TEST_DB, case , j)
+ elif not payload_list:
+ print 'Results not found'
+
if __name__ == "__main__":
main()