Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ruth Netser <[email protected]>
Co-authored-by: Miles Dunn <[email protected]>
  • Loading branch information
3 people committed Jan 18, 2024
1 parent 11cb723 commit f3e8571
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ def test_failure_rule_matches_failure_if_rule_pattern_equals_failure_step(
failure_rule,
):
failure_rule.step = failure.step = "gather-must-gather"
assert failure_rule.matches_failure(failure)
assert failure_rule.matches_failure(
failure,
), f"'{failure_rule.step}' should match '{failure.step}'"


def test_failure_rule_matches_failure_if_glob_style_rule_pattern_matches_failure_step(
Expand All @@ -55,7 +57,9 @@ def test_failure_rule_matches_failure_if_glob_style_rule_pattern_matches_failure
):
failure.step = "gather-must-gather"
failure_rule.step = "gather-*"
assert failure_rule.matches_failure(failure)
assert failure_rule.matches_failure(
failure,
), f"'{failure_rule.step}' should match '{failure.step}'"


def test_failure_rule_does_not_match_non_glob_unequal_failure_step(
Expand All @@ -64,4 +68,6 @@ def test_failure_rule_does_not_match_non_glob_unequal_failure_step(
):
failure.step = "gather-must-gather"
failure_rule.step = "firewatch_report_issues"
assert not failure_rule.matches_failure(failure)
assert not failure_rule.matches_failure(
failure,
), f"'{failure_rule.step}' should NOT match '{failure.step}'"

0 comments on commit f3e8571

Please sign in to comment.