From 82c298518b514a76f4d96704fa4b3ee427776a76 Mon Sep 17 00:00:00 2001 From: Masayuki Igawa Date: Mon, 13 Mar 2017 14:43:25 +0900 Subject: [PATCH] Add failed tests to rss This commit adds failed tests to RSS. It could be useful to understand the reason of failures. Change-Id: Ib1acb636bad352da649b9cca1294462e41bd62be --- openstack_health/api.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openstack_health/api.py b/openstack_health/api.py index 4141a435..80e4f172 100644 --- a/openstack_health/api.py +++ b/openstack_health/api.py @@ -479,6 +479,8 @@ def get_recent_failed_runs_rss(run_metadata_key, value): return abort(make_response(msg, 404)) for run in failed_runs: meta = api.get_run_metadata(run.uuid, session=session) + failing_test_runs = api.get_failing_from_run(run.id, + session=session) uuid = [x.value for x in meta if x.key == 'build_uuid'][0] build_name = [x.value for x in meta if x.key == 'build_name'][0] entry = fg.add_entry() @@ -495,6 +497,11 @@ def get_recent_failed_runs_rss(run_metadata_key, value): metadata_url) content += '
  • Job Page
  • ' % (job_url) content += '' + content += '

    Failed tests

    ' + content += '' entry.description(content) response = make_response(feeds[run_metadata_key][value].rss_str()) response.headers['Content-Type'] = 'application/xml; charset=utf-8'