summaryrefslogtreecommitdiffstats
path: root/utils/test/scripts/mongo2elastic_format.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-09-19 17:52:30 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2016-09-19 17:52:30 +0800
commit6f2bd06f607190d54a1268ad6813b4bf501eac1f (patch)
treea8fbfbc053a84498c8b242cf0aa24b3cdd6a3a75 /utils/test/scripts/mongo2elastic_format.py
parentc5a5ac59a33dacaaf47b210aee42c75f4459b273 (diff)
only publish testcases appear in testcases.py to save time
JIRA: FUNCTEST-474 Change-Id: Icb9f2ceaaf87f6b18d2aa342f093fefb3598f719 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils/test/scripts/mongo2elastic_format.py')
-rw-r--r--utils/test/scripts/mongo2elastic_format.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/utils/test/scripts/mongo2elastic_format.py b/utils/test/scripts/mongo2elastic_format.py
index 0b036e3ff..ef485bae0 100644
--- a/utils/test/scripts/mongo2elastic_format.py
+++ b/utils/test/scripts/mongo2elastic_format.py
@@ -62,7 +62,14 @@ def format_rally(testcase):
-> details.tests
-> details.success_percentage
"""
- summary = testcase['details']['summary']
+ details = testcase['details']
+ summary = None
+ for item in details:
+ if 'summary' in item:
+ summary = item['summary']
+
+ if not summary:
+ return False
testcase['details'] = {
'duration': summary['duration'],