mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: bump github.com/onsi/gomega from 1.19.0 to 1.20.0
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.19.0 to 1.20.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.19.0...v1.20.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:
committed by
mergify[bot]
parent
6e100dde2d
commit
aad99ebcb7
23
vendor/github.com/onsi/gomega/matchers.go
generated
vendored
23
vendor/github.com/onsi/gomega/matchers.go
generated
vendored
@ -3,6 +3,7 @@ package gomega
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/onsi/gomega/matchers"
|
||||
"github.com/onsi/gomega/types"
|
||||
)
|
||||
@ -26,6 +27,15 @@ func BeEquivalentTo(expected interface{}) types.GomegaMatcher {
|
||||
}
|
||||
}
|
||||
|
||||
//BeComparableTo uses gocmp.Equal to compare. You can pass cmp.Option as options.
|
||||
//It is an error for actual and expected to be nil. Use BeNil() instead.
|
||||
func BeComparableTo(expected interface{}, opts ...cmp.Option) types.GomegaMatcher {
|
||||
return &matchers.BeComparableToMatcher{
|
||||
Expected: expected,
|
||||
Options: opts,
|
||||
}
|
||||
}
|
||||
|
||||
//BeIdenticalTo uses the == operator to compare actual with expected.
|
||||
//BeIdenticalTo is strict about types when performing comparisons.
|
||||
//It is an error for both actual and expected to be nil. Use BeNil() instead.
|
||||
@ -394,6 +404,19 @@ func HaveField(field string, expected interface{}) types.GomegaMatcher {
|
||||
}
|
||||
}
|
||||
|
||||
// HaveExistingField succeeds if actual is a struct and the specified field
|
||||
// exists.
|
||||
//
|
||||
// HaveExistingField can be combined with HaveField in order to cover use cases
|
||||
// with optional fields. HaveField alone would trigger an error in such situations.
|
||||
//
|
||||
// Expect(MrHarmless).NotTo(And(HaveExistingField("Title"), HaveField("Title", "Supervillain")))
|
||||
func HaveExistingField(field string) types.GomegaMatcher {
|
||||
return &matchers.HaveExistingFieldMatcher{
|
||||
Field: field,
|
||||
}
|
||||
}
|
||||
|
||||
// HaveValue applies the given matcher to the value of actual, optionally and
|
||||
// repeatedly dereferencing pointers or taking the concrete value of interfaces.
|
||||
// Thus, the matcher will always be applied to non-pointer and non-interface
|
||||
|
Reference in New Issue
Block a user