diff --git a/checks/branch_protection_test.go b/checks/branch_protection_test.go index d0c6f087fcdb..3e55e834cbd3 100644 --- a/checks/branch_protection_test.go +++ b/checks/branch_protection_test.go @@ -363,9 +363,9 @@ func TestReleaseAndDevBranchProtected(t *testing.T) { expected: scut.TestReturn{ Error: nil, Score: 0, - NumberOfWarn: 6, + NumberOfWarn: 4, NumberOfInfo: 0, - NumberOfDebug: 8, + NumberOfDebug: 10, }, nonadmin: true, defaultBranch: main, diff --git a/checks/evaluation/branch_protection.go b/checks/evaluation/branch_protection.go index 4177d0061f06..5e72958addd8 100644 --- a/checks/evaluation/branch_protection.go +++ b/checks/evaluation/branch_protection.go @@ -407,15 +407,8 @@ func adminReviewProtection(f *finding.Finding, doLogging bool, dl checker.Detail if f.Outcome == finding.OutcomePositive { score++ } - switch f.Probe { - case requiresLastPushApproval.Probe, - requiresUpToDateBranches.Probe: - logWithDebug(f, doLogging, dl) - if f.Outcome != finding.OutcomeNotAvailable { - max++ - } - default: - logInfoOrWarn(f, doLogging, dl) + logWithDebug(f, doLogging, dl) + if f.Outcome != finding.OutcomeNotAvailable { max++ } return score, max diff --git a/checks/evaluation/branch_protection_test.go b/checks/evaluation/branch_protection_test.go index f19714145eb9..c0e0565b9554 100644 --- a/checks/evaluation/branch_protection_test.go +++ b/checks/evaluation/branch_protection_test.go @@ -731,9 +731,9 @@ func TestBranchProtection(t *testing.T) { }, result: scut.TestReturn{ Score: 3, - NumberOfWarn: 3, + NumberOfWarn: 2, NumberOfInfo: 2, - NumberOfDebug: 4, + NumberOfDebug: 5, }, }, {