-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fi 2413 optional groups prioritize pass #431
Fi 2413 optional groups prioritize pass #431
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #431 +/- ##
==========================================
+ Coverage 77.08% 77.09% +0.01%
==========================================
Files 220 220
Lines 10946 10951 +5
Branches 1029 1030 +1
==========================================
+ Hits 8438 8443 +5
Misses 1929 1929
Partials 579 579
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…ps-prioritize-pass
lib/inferno/result_summarizer.rb
Outdated
@@ -11,6 +11,10 @@ def initialize(results) | |||
end | |||
|
|||
def summarize | |||
return 'pass' if all_optional_results? && | |||
unique_result_strings.any?('pass') && | |||
unique_result_strings.none? { |result| %w[cancel wait running].include? result } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think cancel belongs here, as the results of the cancelled tests wouldn't prevent the group from passing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed cancel
Summary
If all of a test group's children are optional and at least one child passes the group passes. My exact implementation makes the optional result group priorities (in order): cancel, wait, running, pass, skip, fail, error, omit.
Testing Guidance
Run the infrastructure test suite, where test group 2 now has one passing optional and one failing optional test, with an overall result of pass.
bundle exec rake spec
tests have also been updated accordingly.