From 5cf9b7fe8f380f6315e656527b90778c2d91a95c Mon Sep 17 00:00:00 2001 From: Juha Kosonen Date: Wed, 3 Feb 2016 15:53:49 +0000 Subject: Fix success status parsing of rally results Change-Id: I6053bce6cc919af7ac34a16843b2583e45f01ac2 Signed-off-by: Juha Kosonen --- testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'testcases') diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py index 71bf743f..26597850 100755 --- a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py @@ -161,16 +161,14 @@ def task_succeed(json_raw): :return: Bool """ rally_report = json.loads(json_raw) - rally_report = rally_report[0] - if rally_report is None: - return False - if rally_report.get('result') is None: - return False - - for result in rally_report.get('result'): - if len(result.get('error')) > 0: + for report in rally_report: + if report is None or report.get('result') is None: return False + for result in report.get('result'): + if result is None or len(result.get('error')) > 0: + return False + return True -- cgit 1.2.3-korg