From 698806a69c0aa8246b43efe2eb1bb61ba56165c6 Mon Sep 17 00:00:00 2001 From: xudan Date: Wed, 20 Nov 2019 03:29:44 -0500 Subject: Update the result check for rally tests JIRA: DOVETAIL-790 Change-Id: Ia3bacf307cd2543820eae86733f76a472e34ead2 Signed-off-by: xudan --- docs/release/release-notes/index.rst | 2 +- dovetail/report.py | 2 +- dovetail/tests/unit/test_report.py | 17 +++++++++++------ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/docs/release/release-notes/index.rst b/docs/release/release-notes/index.rst index 8cfbdfe7..59c91baf 100644 --- a/docs/release/release-notes/index.rst +++ b/docs/release/release-notes/index.rst @@ -274,4 +274,4 @@ Useful Links - Dovetail IRC Channel: #opnfv-dovetail - - `Dovetail Test Configuration `_ + - `Dovetail Test Configuration `_ diff --git a/dovetail/report.py b/dovetail/report.py index 9523d388..ed3f942b 100644 --- a/dovetail/report.py +++ b/dovetail/report.py @@ -336,7 +336,7 @@ class FunctestCrawler(Crawler): def get_rally_details(self, data): try: - t_details = data['details'][0]['details'] + t_details = data['details']['modules'][0]['details'] tests = len(t_details['success']) + len(t_details['failures']) details = { 'tests': tests, diff --git a/dovetail/tests/unit/test_report.py b/dovetail/tests/unit/test_report.py index 69cde0d5..41d70d2f 100644 --- a/dovetail/tests/unit/test_report.py +++ b/dovetail/tests/unit/test_report.py @@ -741,12 +741,17 @@ class ReportTesting(unittest.TestCase): 'criteria': 'criteria', 'start_date': 'start_date', 'stop_date': 'stop_date', - 'details': [{ - 'details': { - 'success': ['subt_a'], - 'failures': ['subt_b', 'subt_c'] - } - }] + 'details': { + 'modules': [ + { + 'details': { + 'success': ['subt_a'], + 'failures': ['subt_b', 'subt_c'] + }, + 'module': 'module' + } + ] + } } mock_json.loads.return_value = data_dict -- cgit 1.2.3-korg