-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix display of waived failures: consider subject and scenario (#5397)
On the Automated Tests tab, the web UI attempts to indicate when a failed test has been waived. However, it can get this wrong in several ways. It stores the waivers only by testcase - not by subject or scenario - so if greenwave returns any waiver for the testcase, it will mark any failure of that testcase for the update as 'waived'. This can be incorrect if: * The waiver was filed against the wrong subject and is invalid * The waiver is for a different subject (different Koji build) * The waiver is for a different scenario This should fix all those problems. Instead of just parsing the waivers, we primarily parse the satisfied requirements, and when one is of type "test-result-failed-waived" - meaning it's a failure that was waived - we store it in a nested hash of waived failures. The outer hash's keys are subject identifiers, and its values are hashes. In these inner hashes, the keys are the testcase and scenario combined, and the values are the IDs of waivers for that subject/testcase/scenario combination. We keep a separate hash of waivers, the keys being the waiver IDs and the values being the waivers. So when we are constructing the result rows, we can check whether there is a waived failure for the result's testcase, scenario and subject, and only if so, we add the 'waived' marker, constructing the necessary info from the waiver retrieved from the waivers hash. Signed-off-by: Adam Williamson <[email protected]> (cherry picked from commit 8ae22c4)
- Loading branch information
1 parent
a7272bb
commit befee26
Showing
1 changed file
with
42 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters