From 84f016313220a09f52e58985ef248cbeeb9c5303 Mon Sep 17 00:00:00 2001 From: "red-hat-konflux[bot]" <126015336+red-hat-konflux[bot]@users.noreply.github.com> Date: Fri, 14 Aug 2026 04:13:00 +0000 Subject: [PATCH] Update module github.com/onsi/ginkgo/v2 to v2.32.1 Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md | 5 +++++ .../onsi/ginkgo/v2/internal/group.go | 20 +++++++++++++++++-- .../onsi/ginkgo/v2/types/version.go | 2 +- vendor/modules.txt | 2 +- 6 files changed, 28 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index b8c551b0b..62bafb646 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/go-git/go-git/v5 v5.19.2 github.com/go-logr/logr v1.4.4 github.com/google/uuid v1.6.1-0.20241114170450-2d3c2a9cc518 - github.com/onsi/ginkgo/v2 v2.32.0 + github.com/onsi/ginkgo/v2 v2.32.1 github.com/onsi/gomega v1.42.1 github.com/openshift/api v3.9.0+incompatible github.com/openshift/client-go v0.0.0-20251205093018-96a6cbc1420c // release-4.21 diff --git a/go.sum b/go.sum index d2c58d17f..2e938c454 100644 --- a/go.sum +++ b/go.sum @@ -359,8 +359,8 @@ github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8Ay github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= github.com/onsi/ginkgo/v2 v2.5.0/go.mod h1:Luc4sArBICYCS8THh8v3i3i5CuSZO+RaQRaJoeNwomw= github.com/onsi/ginkgo/v2 v2.7.0/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1LFVcsAo= -github.com/onsi/ginkgo/v2 v2.32.0 h1:Hw7s2pVrQo/8Yz5N77qdnpHaoc+c6cC9WIV1Jce+J6E= -github.com/onsi/ginkgo/v2 v2.32.0/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44= +github.com/onsi/ginkgo/v2 v2.32.1 h1:6tlvcDm/3sE8lGJbZ4+d4mO3RLy24/tQWOFzVSQNIfw= +github.com/onsi/ginkgo/v2 v2.32.1/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= diff --git a/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md b/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md index 10e608564..4d1ed9523 100644 --- a/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md +++ b/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.32.1 + +### Fixes +- Defer AfterAll until repeated spec completes [e647b3b] + ## 2.32.0 `-fd` generate RSpec-style documentation output. Thank @woodie ! diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/group.go b/vendor/github.com/onsi/ginkgo/v2/internal/group.go index 5e6611334..781adf6fa 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/group.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/group.go @@ -211,6 +211,21 @@ func (g *group) isLastSpecWithPair(specID uint, pair runOncePair) bool { return lastSpecID == specID } +func (g *group) willRunAnotherAttempt(isFinalAttempt bool) bool { + if isFinalAttempt { + return false + } + + if g.suite.currentSpecReport.MaxMustPassRepeatedly > 0 { + return g.suite.currentSpecReport.State.Is(types.SpecStatePassed) + } + if g.suite.currentSpecReport.MaxFlakeAttempts > 0 { + return g.suite.currentSpecReport.State.Is(types.SpecStateFailureStates) + } + + return false +} + func (g *group) attemptSpec(isFinalAttempt bool, spec Spec) bool { failedInARunOnceBefore := false pairs := g.runOncePairs[spec.SubjectID()] @@ -280,10 +295,11 @@ func (g *group) attemptSpec(isFinalAttempt bool, spec Spec) bool { } // it's our last chance to run if we're the last spec for our oncePair isLastSpecWithPair := g.isLastSpecWithPair(spec.SubjectID(), pair) + willRunAnotherAttempt := g.willRunAnotherAttempt(isFinalAttempt) switch g.suite.currentSpecReport.State { case types.SpecStatePassed: //this attempt is passing... - return isLastSpecWithPair //...we should run-once if we'this is our last chance + return isLastSpecWithPair && !willRunAnotherAttempt //...we should run-once if this is our last chance case types.SpecStateSkipped: //the spec was skipped by the user... if isLastSpecWithPair { return true //...we're the last spec, so we should run the AfterNode @@ -292,7 +308,7 @@ func (g *group) attemptSpec(isFinalAttempt bool, spec Spec) bool { return true //...or, a run-once node at our nesting level was skipped which means this is our last chance to run } case types.SpecStateFailed, types.SpecStatePanicked, types.SpecStateTimedout: // the spec has failed... - if isFinalAttempt { + if !willRunAnotherAttempt { if g.continueOnFailure { return isLastSpecWithPair || failedInARunOnceBefore //...we're configured to continue on failures - so we should only run if we're the last spec for this pair or if we failed in a runOnceBefore (which means we _are_ the last spec to run) } else { diff --git a/vendor/github.com/onsi/ginkgo/v2/types/version.go b/vendor/github.com/onsi/ginkgo/v2/types/version.go index dc28324c1..177baed9b 100644 --- a/vendor/github.com/onsi/ginkgo/v2/types/version.go +++ b/vendor/github.com/onsi/ginkgo/v2/types/version.go @@ -1,3 +1,3 @@ package types -const VERSION = "2.32.0" +const VERSION = "2.32.1" diff --git a/vendor/modules.txt b/vendor/modules.txt index c59dda079..542a37112 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -582,7 +582,7 @@ github.com/munnerz/goautoneg # github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f ## explicit github.com/mxk/go-flowrate/flowrate -# github.com/onsi/ginkgo/v2 v2.32.0 +# github.com/onsi/ginkgo/v2 v2.32.1 ## explicit; go 1.25.0 github.com/onsi/ginkgo/v2 github.com/onsi/ginkgo/v2/config