aboutsummaryrefslogtreecommitdiffstats
path: root/testcases
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-02-04 10:04:36 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-02-04 10:04:36 +0000
commit12dd0cf47199632dfd9a1eb544ff797ce1411d6a (patch)
tree5b552c4e766f8786cf36ab27409795505cca89b6 /testcases
parent75149a9d278b5a969606ad182fff580c08e37d6c (diff)
parent5cf9b7fe8f380f6315e656527b90778c2d91a95c (diff)
Merge "Fix success status parsing of rally results"
Diffstat (limited to 'testcases')
-rwxr-xr-xtestcases/VIM/OpenStack/CI/libraries/run_rally-cert.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
index 71bf743fb..265978503 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