build(deps): bump github.com/onsi/gomega from 1.24.2 to 1.26.0
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.24.2 to 1.26.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.24.2...v1.26.0) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
12
vendor/github.com/onsi/gomega/gomega_dsl.go
generated
vendored
12
vendor/github.com/onsi/gomega/gomega_dsl.go
generated
vendored
@ -22,7 +22,7 @@ import (
|
||||
"github.com/onsi/gomega/types"
|
||||
)
|
||||
|
||||
const GOMEGA_VERSION = "1.24.2"
|
||||
const GOMEGA_VERSION = "1.26.0"
|
||||
|
||||
const nilGomegaPanic = `You are trying to make an assertion, but haven't registered Gomega's fail handler.
|
||||
If you're using Ginkgo then you probably forgot to put your assertion in an It().
|
||||
@ -360,6 +360,16 @@ You can also pass additional arugments to functions that take a Gomega. The onl
|
||||
g.Expect(elements).To(ConsistOf(expected))
|
||||
}).WithContext(ctx).WithArguments("/names", "Joe", "Jane", "Sam").Should(Succeed())
|
||||
|
||||
You can ensure that you get a number of consecutive successful tries before succeeding using `MustPassRepeatedly(int)`. For Example:
|
||||
|
||||
int count := 0
|
||||
Eventually(func() bool {
|
||||
count++
|
||||
return count > 2
|
||||
}).MustPassRepeatedly(2).Should(BeTrue())
|
||||
// Because we had to wait for 2 calls that returned true
|
||||
Expect(count).To(Equal(3))
|
||||
|
||||
Finally, in addition to passing timeouts and a context to Eventually you can be more explicit with Eventually's chaining configuration methods:
|
||||
|
||||
Eventually(..., "1s", "2s", ctx).Should(...)
|
||||
|
Reference in New Issue
Block a user