dependencies: ginkgo v2.9.1, gomega v1.27.4
They contain some nice-to-have improvements (for example, better printing of errors with gomega/format.Object) but nothing that is critical right now. "go mod tidy" was run manually in staging/src/k8s.io/kms/internal/plugins/mock (https://github.com/kubernetes/kubernetes/pull/116613 not merged yet).
This commit is contained in:
16
vendor/github.com/onsi/gomega/internal/async_assertion.go
generated
vendored
16
vendor/github.com/onsi/gomega/internal/async_assertion.go
generated
vendored
@@ -412,7 +412,7 @@ func (assertion *AsyncAssertion) match(matcher types.GomegaMatcher, desiredMatch
|
||||
message += format.Object(attachment.Object, 1)
|
||||
}
|
||||
} else {
|
||||
message = preamble + "\n" + err.Error() + "\n" + format.Object(err, 1)
|
||||
message = preamble + "\n" + format.Object(err, 1)
|
||||
}
|
||||
return message
|
||||
}
|
||||
@@ -425,10 +425,18 @@ func (assertion *AsyncAssertion) match(matcher types.GomegaMatcher, desiredMatch
|
||||
|
||||
if actualErr == nil {
|
||||
if matcherErr == nil {
|
||||
if desiredMatch {
|
||||
message += matcher.FailureMessage(actual)
|
||||
if desiredMatch != matches {
|
||||
if desiredMatch {
|
||||
message += matcher.FailureMessage(actual)
|
||||
} else {
|
||||
message += matcher.NegatedFailureMessage(actual)
|
||||
}
|
||||
} else {
|
||||
message += matcher.NegatedFailureMessage(actual)
|
||||
if assertion.asyncType == AsyncAssertionTypeConsistently {
|
||||
message += "There is no failure as the matcher passed to Consistently has not yet failed"
|
||||
} else {
|
||||
message += "There is no failure as the matcher passed to Eventually succeeded on its most recent iteration"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
var fgErr formattedGomegaError
|
||||
|
||||
Reference in New Issue
Block a user