summaryrefslogtreecommitdiffstats
path: root/dashboard
diff options
context:
space:
mode:
authorMofassirArif <Mofassir_Arif@dellteam.com>2016-01-21 06:42:23 -0800
committerMofassirArif <Mofassir_Arif@dellteam.com>2016-01-21 07:28:54 -0800
commit971a7c98515a9d83661f5e423f7e8390f35dca59 (patch)
treeee1d930fca39fa6875de6e18a2ae3dd9dba6f70f /dashboard
parent688380c212d1fc7cceb969a4d150c7764fcdeb77 (diff)
bug fix: result collection bug fix for docker images
Change-Id: Ia4ea09b90c7a4f4e3699af456c6d66e85661cc0b Signed-off-by: MofassirArif <Mofassir_Arif@dellteam.com>
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()