From 72737a306e77e4fb2b73e5055b704c4b76b69d95 Mon Sep 17 00:00:00 2001 From: Jay Pipes Date: Tue, 7 Oct 2025 11:53:22 -0400 Subject: [PATCH] correct logic bug in overall Run.OK() method We were not properly returning false for Run.OK() when there was a single failure in any test scenario. Issue gdt-dev/gdt#65 Signed-off-by: Jay Pipes --- run/run.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/run/run.go b/run/run.go index d0f6835..589afb8 100644 --- a/run/run.go +++ b/run/run.go @@ -21,9 +21,9 @@ type Run struct { // OK returns true if all Scenarios in the Run had all successful test units. func (r *Run) OK() bool { - return !lo.SomeBy(lo.Values(r.scenarioResults), func(results []TestUnitResult) bool { - return !lo.SomeBy(results, func(r TestUnitResult) bool { - return len(r.failures) == 0 + return lo.EveryBy(lo.Values(r.scenarioResults), func(results []TestUnitResult) bool { + return lo.EveryBy(results, func(tur TestUnitResult) bool { + return tur.OK() }) }) }