summaryrefslogtreecommitdiff
path: root/vendor/github.com/onsi/gomega/gomega_dsl.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-08 16:10:44 +0200
committerGitHub <noreply@github.com>2020-05-08 16:10:44 +0200
commitdb9940fb42fb199d335dcd549ac24972ef89d5c0 (patch)
tree0c52b4a1708ad08377904bf5470ac0219f1f527b /vendor/github.com/onsi/gomega/gomega_dsl.go
parentbacfae646acef03e8441a8015688c7d02617f120 (diff)
parent6b425c46c37ec736019eea7c7329f77885037373 (diff)
downloadpodman-db9940fb42fb199d335dcd549ac24972ef89d5c0.tar.gz
podman-db9940fb42fb199d335dcd549ac24972ef89d5c0.tar.bz2
podman-db9940fb42fb199d335dcd549ac24972ef89d5c0.zip
Merge pull request #6129 from containers/dependabot/go_modules/github.com/onsi/gomega-1.10.0
Bump github.com/onsi/gomega from 1.9.0 to 1.10.0
Diffstat (limited to 'vendor/github.com/onsi/gomega/gomega_dsl.go')
-rw-r--r--vendor/github.com/onsi/gomega/gomega_dsl.go33
1 files changed, 31 insertions, 2 deletions
diff --git a/vendor/github.com/onsi/gomega/gomega_dsl.go b/vendor/github.com/onsi/gomega/gomega_dsl.go
index 0ab35bc7a..65e837e20 100644
--- a/vendor/github.com/onsi/gomega/gomega_dsl.go
+++ b/vendor/github.com/onsi/gomega/gomega_dsl.go
@@ -24,7 +24,7 @@ import (
"github.com/onsi/gomega/types"
)
-const GOMEGA_VERSION = "1.9.0"
+const GOMEGA_VERSION = "1.10.0"
const nilFailHandlerPanic = `You are trying to make an assertion, but Gomega's fail handler is nil.
If you're using Ginkgo then you probably forgot to put your assertion in an It().
@@ -252,7 +252,7 @@ func Consistently(actual interface{}, intervals ...interface{}) AsyncAssertion {
return ConsistentlyWithOffset(0, actual, intervals...)
}
-// ConsistentlyWithOffset operates like Consistnetly but takes an additional
+// ConsistentlyWithOffset operates like Consistently but takes an additional
// initial argument to indicate an offset in the call stack. This is useful when building helper
// functions that contain matchers. To learn more, read about `ExpectWithOffset`.
func ConsistentlyWithOffset(offset int, actual interface{}, intervals ...interface{}) AsyncAssertion {
@@ -432,3 +432,32 @@ func toDuration(input interface{}) time.Duration {
panic(fmt.Sprintf("%v is not a valid interval. Must be time.Duration, parsable duration string or a number.", input))
}
+
+// Gomega describes the essential Gomega DSL. This interface allows libraries
+// to abstract between the standard package-level function implementations
+// and alternatives like *WithT.
+type Gomega interface {
+ Expect(actual interface{}, extra ...interface{}) Assertion
+ Eventually(actual interface{}, intervals ...interface{}) AsyncAssertion
+ Consistently(actual interface{}, intervals ...interface{}) AsyncAssertion
+}
+
+type globalFailHandlerGomega struct{}
+
+// DefaultGomega supplies the standard package-level implementation
+var Default Gomega = globalFailHandlerGomega{}
+
+// Expect is used to make assertions. See documentation for Expect.
+func (globalFailHandlerGomega) Expect(actual interface{}, extra ...interface{}) Assertion {
+ return Expect(actual, extra...)
+}
+
+// Eventually is used to make asynchronous assertions. See documentation for Eventually.
+func (globalFailHandlerGomega) Eventually(actual interface{}, extra ...interface{}) AsyncAssertion {
+ return Eventually(actual, extra...)
+}
+
+// Consistently is used to make asynchronous assertions. See documentation for Consistently.
+func (globalFailHandlerGomega) Consistently(actual interface{}, extra ...interface{}) AsyncAssertion {
+ return Consistently(actual, extra...)
+}