mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
rebase: bump the github-dependencies group in /e2e with 2 updates
Bumps the github-dependencies group in /e2e with 2 updates: [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) and [github.com/onsi/gomega](https://github.com/onsi/gomega). Updates `github.com/onsi/ginkgo/v2` from 2.23.0 to 2.23.3 - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.23.0...v2.23.3) Updates `github.com/onsi/gomega` from 1.36.2 to 1.36.3 - [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.36.2...v1.36.3) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-dependencies - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
9002d95e53
commit
2fe7dbe2af
8
e2e/vendor/github.com/onsi/gomega/matchers/and.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/and.go
generated
vendored
@ -14,7 +14,7 @@ type AndMatcher struct {
|
||||
firstFailedMatcher types.GomegaMatcher
|
||||
}
|
||||
|
||||
func (m *AndMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (m *AndMatcher) Match(actual any) (success bool, err error) {
|
||||
m.firstFailedMatcher = nil
|
||||
for _, matcher := range m.Matchers {
|
||||
success, err := matcher.Match(actual)
|
||||
@ -26,16 +26,16 @@ func (m *AndMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (m *AndMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (m *AndMatcher) FailureMessage(actual any) (message string) {
|
||||
return m.firstFailedMatcher.FailureMessage(actual)
|
||||
}
|
||||
|
||||
func (m *AndMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (m *AndMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
// not the most beautiful list of matchers, but not bad either...
|
||||
return format.Message(actual, fmt.Sprintf("To not satisfy all of these matchers: %s", m.Matchers))
|
||||
}
|
||||
|
||||
func (m *AndMatcher) MatchMayChangeInTheFuture(actual interface{}) bool {
|
||||
func (m *AndMatcher) MatchMayChangeInTheFuture(actual any) bool {
|
||||
/*
|
||||
Example with 3 matchers: A, B, C
|
||||
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher.go
generated
vendored
@ -10,10 +10,10 @@ import (
|
||||
)
|
||||
|
||||
type AssignableToTypeOfMatcher struct {
|
||||
Expected interface{}
|
||||
Expected any
|
||||
}
|
||||
|
||||
func (matcher *AssignableToTypeOfMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *AssignableToTypeOfMatcher) Match(actual any) (success bool, err error) {
|
||||
if actual == nil && matcher.Expected == nil {
|
||||
return false, fmt.Errorf("Refusing to compare <nil> to <nil>.\nBe explicit and use BeNil() instead. This is to avoid mistakes where both sides of an assertion are erroneously uninitialized.")
|
||||
} else if matcher.Expected == nil {
|
||||
@ -28,10 +28,10 @@ func (matcher *AssignableToTypeOfMatcher) Match(actual interface{}) (success boo
|
||||
return actualType.AssignableTo(expectedType), nil
|
||||
}
|
||||
|
||||
func (matcher *AssignableToTypeOfMatcher) FailureMessage(actual interface{}) string {
|
||||
func (matcher *AssignableToTypeOfMatcher) FailureMessage(actual any) string {
|
||||
return format.Message(actual, fmt.Sprintf("to be assignable to the type: %T", matcher.Expected))
|
||||
}
|
||||
|
||||
func (matcher *AssignableToTypeOfMatcher) NegatedFailureMessage(actual interface{}) string {
|
||||
func (matcher *AssignableToTypeOfMatcher) NegatedFailureMessage(actual any) string {
|
||||
return format.Message(actual, fmt.Sprintf("not to be assignable to the type: %T", matcher.Expected))
|
||||
}
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/be_a_directory.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/be_a_directory.go
generated
vendored
@ -24,11 +24,11 @@ func (t notADirectoryError) Error() string {
|
||||
}
|
||||
|
||||
type BeADirectoryMatcher struct {
|
||||
expected interface{}
|
||||
expected any
|
||||
err error
|
||||
}
|
||||
|
||||
func (matcher *BeADirectoryMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *BeADirectoryMatcher) Match(actual any) (success bool, err error) {
|
||||
actualFilename, ok := actual.(string)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("BeADirectoryMatcher matcher expects a file path")
|
||||
@ -47,10 +47,10 @@ func (matcher *BeADirectoryMatcher) Match(actual interface{}) (success bool, err
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (matcher *BeADirectoryMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeADirectoryMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, fmt.Sprintf("to be a directory: %s", matcher.err))
|
||||
}
|
||||
|
||||
func (matcher *BeADirectoryMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeADirectoryMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not be a directory")
|
||||
}
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/be_a_regular_file.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/be_a_regular_file.go
generated
vendored
@ -24,11 +24,11 @@ func (t notARegularFileError) Error() string {
|
||||
}
|
||||
|
||||
type BeARegularFileMatcher struct {
|
||||
expected interface{}
|
||||
expected any
|
||||
err error
|
||||
}
|
||||
|
||||
func (matcher *BeARegularFileMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *BeARegularFileMatcher) Match(actual any) (success bool, err error) {
|
||||
actualFilename, ok := actual.(string)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("BeARegularFileMatcher matcher expects a file path")
|
||||
@ -47,10 +47,10 @@ func (matcher *BeARegularFileMatcher) Match(actual interface{}) (success bool, e
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (matcher *BeARegularFileMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeARegularFileMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, fmt.Sprintf("to be a regular file: %s", matcher.err))
|
||||
}
|
||||
|
||||
func (matcher *BeARegularFileMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeARegularFileMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not be a regular file")
|
||||
}
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/be_an_existing_file.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/be_an_existing_file.go
generated
vendored
@ -10,10 +10,10 @@ import (
|
||||
)
|
||||
|
||||
type BeAnExistingFileMatcher struct {
|
||||
expected interface{}
|
||||
expected any
|
||||
}
|
||||
|
||||
func (matcher *BeAnExistingFileMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *BeAnExistingFileMatcher) Match(actual any) (success bool, err error) {
|
||||
actualFilename, ok := actual.(string)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("BeAnExistingFileMatcher matcher expects a file path")
|
||||
@ -31,10 +31,10 @@ func (matcher *BeAnExistingFileMatcher) Match(actual interface{}) (success bool,
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (matcher *BeAnExistingFileMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeAnExistingFileMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to exist")
|
||||
}
|
||||
|
||||
func (matcher *BeAnExistingFileMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeAnExistingFileMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to exist")
|
||||
}
|
||||
|
6
e2e/vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go
generated
vendored
6
e2e/vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go
generated
vendored
@ -12,7 +12,7 @@ import (
|
||||
type BeClosedMatcher struct {
|
||||
}
|
||||
|
||||
func (matcher *BeClosedMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *BeClosedMatcher) Match(actual any) (success bool, err error) {
|
||||
if !isChan(actual) {
|
||||
return false, fmt.Errorf("BeClosed matcher expects a channel. Got:\n%s", format.Object(actual, 1))
|
||||
}
|
||||
@ -39,10 +39,10 @@ func (matcher *BeClosedMatcher) Match(actual interface{}) (success bool, err err
|
||||
return closed, nil
|
||||
}
|
||||
|
||||
func (matcher *BeClosedMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeClosedMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to be closed")
|
||||
}
|
||||
|
||||
func (matcher *BeClosedMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeClosedMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to be open")
|
||||
}
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/be_comparable_to_matcher.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/be_comparable_to_matcher.go
generated
vendored
@ -9,11 +9,11 @@ import (
|
||||
)
|
||||
|
||||
type BeComparableToMatcher struct {
|
||||
Expected interface{}
|
||||
Expected any
|
||||
Options cmp.Options
|
||||
}
|
||||
|
||||
func (matcher *BeComparableToMatcher) Match(actual interface{}) (success bool, matchErr error) {
|
||||
func (matcher *BeComparableToMatcher) Match(actual any) (success bool, matchErr error) {
|
||||
if actual == nil && matcher.Expected == nil {
|
||||
return false, fmt.Errorf("Refusing to compare <nil> to <nil>.\nBe explicit and use BeNil() instead. This is to avoid mistakes where both sides of an assertion are erroneously uninitialized.")
|
||||
}
|
||||
@ -40,10 +40,10 @@ func (matcher *BeComparableToMatcher) Match(actual interface{}) (success bool, m
|
||||
return cmp.Equal(actual, matcher.Expected, matcher.Options...), nil
|
||||
}
|
||||
|
||||
func (matcher *BeComparableToMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeComparableToMatcher) FailureMessage(actual any) (message string) {
|
||||
return fmt.Sprint("Expected object to be comparable, diff: ", cmp.Diff(actual, matcher.Expected, matcher.Options...))
|
||||
}
|
||||
|
||||
func (matcher *BeComparableToMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeComparableToMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to be comparable to", matcher.Expected)
|
||||
}
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/be_element_of_matcher.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/be_element_of_matcher.go
generated
vendored
@ -10,10 +10,10 @@ import (
|
||||
)
|
||||
|
||||
type BeElementOfMatcher struct {
|
||||
Elements []interface{}
|
||||
Elements []any
|
||||
}
|
||||
|
||||
func (matcher *BeElementOfMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *BeElementOfMatcher) Match(actual any) (success bool, err error) {
|
||||
if reflect.TypeOf(actual) == nil {
|
||||
return false, fmt.Errorf("BeElement matcher expects actual to be typed")
|
||||
}
|
||||
@ -34,10 +34,10 @@ func (matcher *BeElementOfMatcher) Match(actual interface{}) (success bool, err
|
||||
return false, lastError
|
||||
}
|
||||
|
||||
func (matcher *BeElementOfMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeElementOfMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to be an element of", presentable(matcher.Elements))
|
||||
}
|
||||
|
||||
func (matcher *BeElementOfMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeElementOfMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to be an element of", presentable(matcher.Elements))
|
||||
}
|
||||
|
6
e2e/vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go
generated
vendored
6
e2e/vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go
generated
vendored
@ -13,7 +13,7 @@ import (
|
||||
type BeEmptyMatcher struct {
|
||||
}
|
||||
|
||||
func (matcher *BeEmptyMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *BeEmptyMatcher) Match(actual any) (success bool, err error) {
|
||||
// short-circuit the iterator case, as we only need to see the first
|
||||
// element, if any.
|
||||
if miter.IsIter(actual) {
|
||||
@ -34,10 +34,10 @@ func (matcher *BeEmptyMatcher) Match(actual interface{}) (success bool, err erro
|
||||
return length == 0, nil
|
||||
}
|
||||
|
||||
func (matcher *BeEmptyMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeEmptyMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to be empty")
|
||||
}
|
||||
|
||||
func (matcher *BeEmptyMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeEmptyMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to be empty")
|
||||
}
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go
generated
vendored
@ -10,10 +10,10 @@ import (
|
||||
)
|
||||
|
||||
type BeEquivalentToMatcher struct {
|
||||
Expected interface{}
|
||||
Expected any
|
||||
}
|
||||
|
||||
func (matcher *BeEquivalentToMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *BeEquivalentToMatcher) Match(actual any) (success bool, err error) {
|
||||
if actual == nil && matcher.Expected == nil {
|
||||
return false, fmt.Errorf("Both actual and expected must not be nil.")
|
||||
}
|
||||
@ -27,10 +27,10 @@ func (matcher *BeEquivalentToMatcher) Match(actual interface{}) (success bool, e
|
||||
return reflect.DeepEqual(convertedActual, matcher.Expected), nil
|
||||
}
|
||||
|
||||
func (matcher *BeEquivalentToMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeEquivalentToMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to be equivalent to", matcher.Expected)
|
||||
}
|
||||
|
||||
func (matcher *BeEquivalentToMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeEquivalentToMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to be equivalent to", matcher.Expected)
|
||||
}
|
||||
|
6
e2e/vendor/github.com/onsi/gomega/matchers/be_false_matcher.go
generated
vendored
6
e2e/vendor/github.com/onsi/gomega/matchers/be_false_matcher.go
generated
vendored
@ -12,7 +12,7 @@ type BeFalseMatcher struct {
|
||||
Reason string
|
||||
}
|
||||
|
||||
func (matcher *BeFalseMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *BeFalseMatcher) Match(actual any) (success bool, err error) {
|
||||
if !isBool(actual) {
|
||||
return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1))
|
||||
}
|
||||
@ -20,7 +20,7 @@ func (matcher *BeFalseMatcher) Match(actual interface{}) (success bool, err erro
|
||||
return actual == false, nil
|
||||
}
|
||||
|
||||
func (matcher *BeFalseMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeFalseMatcher) FailureMessage(actual any) (message string) {
|
||||
if matcher.Reason == "" {
|
||||
return format.Message(actual, "to be false")
|
||||
} else {
|
||||
@ -28,7 +28,7 @@ func (matcher *BeFalseMatcher) FailureMessage(actual interface{}) (message strin
|
||||
}
|
||||
}
|
||||
|
||||
func (matcher *BeFalseMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeFalseMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
if matcher.Reason == "" {
|
||||
return format.Message(actual, "not to be false")
|
||||
} else {
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/be_identical_to.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/be_identical_to.go
generated
vendored
@ -10,10 +10,10 @@ import (
|
||||
)
|
||||
|
||||
type BeIdenticalToMatcher struct {
|
||||
Expected interface{}
|
||||
Expected any
|
||||
}
|
||||
|
||||
func (matcher *BeIdenticalToMatcher) Match(actual interface{}) (success bool, matchErr error) {
|
||||
func (matcher *BeIdenticalToMatcher) Match(actual any) (success bool, matchErr error) {
|
||||
if actual == nil && matcher.Expected == nil {
|
||||
return false, fmt.Errorf("Refusing to compare <nil> to <nil>.\nBe explicit and use BeNil() instead. This is to avoid mistakes where both sides of an assertion are erroneously uninitialized.")
|
||||
}
|
||||
@ -30,10 +30,10 @@ func (matcher *BeIdenticalToMatcher) Match(actual interface{}) (success bool, ma
|
||||
return actual == matcher.Expected, nil
|
||||
}
|
||||
|
||||
func (matcher *BeIdenticalToMatcher) FailureMessage(actual interface{}) string {
|
||||
func (matcher *BeIdenticalToMatcher) FailureMessage(actual any) string {
|
||||
return format.Message(actual, "to be identical to", matcher.Expected)
|
||||
}
|
||||
|
||||
func (matcher *BeIdenticalToMatcher) NegatedFailureMessage(actual interface{}) string {
|
||||
func (matcher *BeIdenticalToMatcher) NegatedFailureMessage(actual any) string {
|
||||
return format.Message(actual, "not to be identical to", matcher.Expected)
|
||||
}
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/be_key_of_matcher.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/be_key_of_matcher.go
generated
vendored
@ -8,10 +8,10 @@ import (
|
||||
)
|
||||
|
||||
type BeKeyOfMatcher struct {
|
||||
Map interface{}
|
||||
Map any
|
||||
}
|
||||
|
||||
func (matcher *BeKeyOfMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *BeKeyOfMatcher) Match(actual any) (success bool, err error) {
|
||||
if !isMap(matcher.Map) {
|
||||
return false, fmt.Errorf("BeKeyOf matcher needs expected to be a map type")
|
||||
}
|
||||
@ -36,10 +36,10 @@ func (matcher *BeKeyOfMatcher) Match(actual interface{}) (success bool, err erro
|
||||
return false, lastError
|
||||
}
|
||||
|
||||
func (matcher *BeKeyOfMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeKeyOfMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to be a key of", presentable(valuesOf(matcher.Map)))
|
||||
}
|
||||
|
||||
func (matcher *BeKeyOfMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeKeyOfMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to be a key of", presentable(valuesOf(matcher.Map)))
|
||||
}
|
||||
|
6
e2e/vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go
generated
vendored
6
e2e/vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go
generated
vendored
@ -7,14 +7,14 @@ import "github.com/onsi/gomega/format"
|
||||
type BeNilMatcher struct {
|
||||
}
|
||||
|
||||
func (matcher *BeNilMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *BeNilMatcher) Match(actual any) (success bool, err error) {
|
||||
return isNil(actual), nil
|
||||
}
|
||||
|
||||
func (matcher *BeNilMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeNilMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to be nil")
|
||||
}
|
||||
|
||||
func (matcher *BeNilMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeNilMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to be nil")
|
||||
}
|
||||
|
10
e2e/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher.go
generated
vendored
10
e2e/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher.go
generated
vendored
@ -11,18 +11,18 @@ import (
|
||||
|
||||
type BeNumericallyMatcher struct {
|
||||
Comparator string
|
||||
CompareTo []interface{}
|
||||
CompareTo []any
|
||||
}
|
||||
|
||||
func (matcher *BeNumericallyMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeNumericallyMatcher) FailureMessage(actual any) (message string) {
|
||||
return matcher.FormatFailureMessage(actual, false)
|
||||
}
|
||||
|
||||
func (matcher *BeNumericallyMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeNumericallyMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return matcher.FormatFailureMessage(actual, true)
|
||||
}
|
||||
|
||||
func (matcher *BeNumericallyMatcher) FormatFailureMessage(actual interface{}, negated bool) (message string) {
|
||||
func (matcher *BeNumericallyMatcher) FormatFailureMessage(actual any, negated bool) (message string) {
|
||||
if len(matcher.CompareTo) == 1 {
|
||||
message = fmt.Sprintf("to be %s", matcher.Comparator)
|
||||
} else {
|
||||
@ -34,7 +34,7 @@ func (matcher *BeNumericallyMatcher) FormatFailureMessage(actual interface{}, ne
|
||||
return format.Message(actual, message, matcher.CompareTo[0])
|
||||
}
|
||||
|
||||
func (matcher *BeNumericallyMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *BeNumericallyMatcher) Match(actual any) (success bool, err error) {
|
||||
if len(matcher.CompareTo) == 0 || len(matcher.CompareTo) > 2 {
|
||||
return false, fmt.Errorf("BeNumerically requires 1 or 2 CompareTo arguments. Got:\n%s", format.Object(matcher.CompareTo, 1))
|
||||
}
|
||||
|
10
e2e/vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go
generated
vendored
10
e2e/vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go
generated
vendored
@ -10,11 +10,11 @@ import (
|
||||
)
|
||||
|
||||
type BeSentMatcher struct {
|
||||
Arg interface{}
|
||||
Arg any
|
||||
channelClosed bool
|
||||
}
|
||||
|
||||
func (matcher *BeSentMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *BeSentMatcher) Match(actual any) (success bool, err error) {
|
||||
if !isChan(actual) {
|
||||
return false, fmt.Errorf("BeSent expects a channel. Got:\n%s", format.Object(actual, 1))
|
||||
}
|
||||
@ -56,15 +56,15 @@ func (matcher *BeSentMatcher) Match(actual interface{}) (success bool, err error
|
||||
return didSend, nil
|
||||
}
|
||||
|
||||
func (matcher *BeSentMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeSentMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to send:", matcher.Arg)
|
||||
}
|
||||
|
||||
func (matcher *BeSentMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeSentMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to send:", matcher.Arg)
|
||||
}
|
||||
|
||||
func (matcher *BeSentMatcher) MatchMayChangeInTheFuture(actual interface{}) bool {
|
||||
func (matcher *BeSentMatcher) MatchMayChangeInTheFuture(actual any) bool {
|
||||
if !isChan(actual) {
|
||||
return false
|
||||
}
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/be_temporally_matcher.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/be_temporally_matcher.go
generated
vendored
@ -15,17 +15,17 @@ type BeTemporallyMatcher struct {
|
||||
Threshold []time.Duration
|
||||
}
|
||||
|
||||
func (matcher *BeTemporallyMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeTemporallyMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, fmt.Sprintf("to be %s", matcher.Comparator), matcher.CompareTo)
|
||||
}
|
||||
|
||||
func (matcher *BeTemporallyMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeTemporallyMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, fmt.Sprintf("not to be %s", matcher.Comparator), matcher.CompareTo)
|
||||
}
|
||||
|
||||
func (matcher *BeTemporallyMatcher) Match(actual interface{}) (bool, error) {
|
||||
func (matcher *BeTemporallyMatcher) Match(actual any) (bool, error) {
|
||||
// predicate to test for time.Time type
|
||||
isTime := func(t interface{}) bool {
|
||||
isTime := func(t any) bool {
|
||||
_, ok := t.(time.Time)
|
||||
return ok
|
||||
}
|
||||
|
6
e2e/vendor/github.com/onsi/gomega/matchers/be_true_matcher.go
generated
vendored
6
e2e/vendor/github.com/onsi/gomega/matchers/be_true_matcher.go
generated
vendored
@ -12,7 +12,7 @@ type BeTrueMatcher struct {
|
||||
Reason string
|
||||
}
|
||||
|
||||
func (matcher *BeTrueMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *BeTrueMatcher) Match(actual any) (success bool, err error) {
|
||||
if !isBool(actual) {
|
||||
return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1))
|
||||
}
|
||||
@ -20,7 +20,7 @@ func (matcher *BeTrueMatcher) Match(actual interface{}) (success bool, err error
|
||||
return actual.(bool), nil
|
||||
}
|
||||
|
||||
func (matcher *BeTrueMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeTrueMatcher) FailureMessage(actual any) (message string) {
|
||||
if matcher.Reason == "" {
|
||||
return format.Message(actual, "to be true")
|
||||
} else {
|
||||
@ -28,7 +28,7 @@ func (matcher *BeTrueMatcher) FailureMessage(actual interface{}) (message string
|
||||
}
|
||||
}
|
||||
|
||||
func (matcher *BeTrueMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeTrueMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
if matcher.Reason == "" {
|
||||
return format.Message(actual, "not to be true")
|
||||
} else {
|
||||
|
6
e2e/vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go
generated
vendored
6
e2e/vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go
generated
vendored
@ -9,7 +9,7 @@ import (
|
||||
type BeZeroMatcher struct {
|
||||
}
|
||||
|
||||
func (matcher *BeZeroMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *BeZeroMatcher) Match(actual any) (success bool, err error) {
|
||||
if actual == nil {
|
||||
return true, nil
|
||||
}
|
||||
@ -19,10 +19,10 @@ func (matcher *BeZeroMatcher) Match(actual interface{}) (success bool, err error
|
||||
|
||||
}
|
||||
|
||||
func (matcher *BeZeroMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeZeroMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to be zero-valued")
|
||||
}
|
||||
|
||||
func (matcher *BeZeroMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *BeZeroMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to be zero-valued")
|
||||
}
|
||||
|
34
e2e/vendor/github.com/onsi/gomega/matchers/consist_of.go
generated
vendored
34
e2e/vendor/github.com/onsi/gomega/matchers/consist_of.go
generated
vendored
@ -12,12 +12,12 @@ import (
|
||||
)
|
||||
|
||||
type ConsistOfMatcher struct {
|
||||
Elements []interface{}
|
||||
missingElements []interface{}
|
||||
extraElements []interface{}
|
||||
Elements []any
|
||||
missingElements []any
|
||||
extraElements []any
|
||||
}
|
||||
|
||||
func (matcher *ConsistOfMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *ConsistOfMatcher) Match(actual any) (success bool, err error) {
|
||||
if !isArrayOrSlice(actual) && !isMap(actual) && !miter.IsIter(actual) {
|
||||
return false, fmt.Errorf("ConsistOf matcher expects an array/slice/map/iter.Seq/iter.Seq2. Got:\n%s", format.Object(actual, 1))
|
||||
}
|
||||
@ -35,19 +35,19 @@ func (matcher *ConsistOfMatcher) Match(actual interface{}) (success bool, err er
|
||||
return true, nil
|
||||
}
|
||||
|
||||
var missingMatchers []interface{}
|
||||
var missingMatchers []any
|
||||
matcher.extraElements, missingMatchers = bipartiteGraph.FreeLeftRight(edges)
|
||||
matcher.missingElements = equalMatchersToElements(missingMatchers)
|
||||
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func neighbours(value, matcher interface{}) (bool, error) {
|
||||
func neighbours(value, matcher any) (bool, error) {
|
||||
match, err := matcher.(omegaMatcher).Match(value)
|
||||
return match && err == nil, nil
|
||||
}
|
||||
|
||||
func equalMatchersToElements(matchers []interface{}) (elements []interface{}) {
|
||||
func equalMatchersToElements(matchers []any) (elements []any) {
|
||||
for _, matcher := range matchers {
|
||||
if equalMatcher, ok := matcher.(*EqualMatcher); ok {
|
||||
elements = append(elements, equalMatcher.Expected)
|
||||
@ -60,7 +60,7 @@ func equalMatchersToElements(matchers []interface{}) (elements []interface{}) {
|
||||
return
|
||||
}
|
||||
|
||||
func flatten(elems []interface{}) []interface{} {
|
||||
func flatten(elems []any) []any {
|
||||
if len(elems) != 1 ||
|
||||
!(isArrayOrSlice(elems[0]) ||
|
||||
(miter.IsIter(elems[0]) && !miter.IsSeq2(elems[0]))) {
|
||||
@ -77,14 +77,14 @@ func flatten(elems []interface{}) []interface{} {
|
||||
}
|
||||
|
||||
value := reflect.ValueOf(elems[0])
|
||||
flattened := make([]interface{}, value.Len())
|
||||
flattened := make([]any, value.Len())
|
||||
for i := 0; i < value.Len(); i++ {
|
||||
flattened[i] = value.Index(i).Interface()
|
||||
}
|
||||
return flattened
|
||||
}
|
||||
|
||||
func matchers(expectedElems []interface{}) (matchers []interface{}) {
|
||||
func matchers(expectedElems []any) (matchers []any) {
|
||||
for _, e := range flatten(expectedElems) {
|
||||
if e == nil {
|
||||
matchers = append(matchers, &BeNilMatcher{})
|
||||
@ -97,11 +97,11 @@ func matchers(expectedElems []interface{}) (matchers []interface{}) {
|
||||
return
|
||||
}
|
||||
|
||||
func presentable(elems []interface{}) interface{} {
|
||||
func presentable(elems []any) any {
|
||||
elems = flatten(elems)
|
||||
|
||||
if len(elems) == 0 {
|
||||
return []interface{}{}
|
||||
return []any{}
|
||||
}
|
||||
|
||||
sv := reflect.ValueOf(elems)
|
||||
@ -125,9 +125,9 @@ func presentable(elems []interface{}) interface{} {
|
||||
return ss.Interface()
|
||||
}
|
||||
|
||||
func valuesOf(actual interface{}) []interface{} {
|
||||
func valuesOf(actual any) []any {
|
||||
value := reflect.ValueOf(actual)
|
||||
values := []interface{}{}
|
||||
values := []any{}
|
||||
if miter.IsIter(actual) {
|
||||
if miter.IsSeq2(actual) {
|
||||
miter.IterateKV(actual, func(k, v reflect.Value) bool {
|
||||
@ -154,7 +154,7 @@ func valuesOf(actual interface{}) []interface{} {
|
||||
return values
|
||||
}
|
||||
|
||||
func (matcher *ConsistOfMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *ConsistOfMatcher) FailureMessage(actual any) (message string) {
|
||||
message = format.Message(actual, "to consist of", presentable(matcher.Elements))
|
||||
message = appendMissingElements(message, matcher.missingElements)
|
||||
if len(matcher.extraElements) > 0 {
|
||||
@ -164,7 +164,7 @@ func (matcher *ConsistOfMatcher) FailureMessage(actual interface{}) (message str
|
||||
return
|
||||
}
|
||||
|
||||
func appendMissingElements(message string, missingElements []interface{}) string {
|
||||
func appendMissingElements(message string, missingElements []any) string {
|
||||
if len(missingElements) == 0 {
|
||||
return message
|
||||
}
|
||||
@ -172,6 +172,6 @@ func appendMissingElements(message string, missingElements []interface{}) string
|
||||
format.Object(presentable(missingElements), 1))
|
||||
}
|
||||
|
||||
func (matcher *ConsistOfMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *ConsistOfMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to consist of", presentable(matcher.Elements))
|
||||
}
|
||||
|
18
e2e/vendor/github.com/onsi/gomega/matchers/contain_element_matcher.go
generated
vendored
18
e2e/vendor/github.com/onsi/gomega/matchers/contain_element_matcher.go
generated
vendored
@ -12,11 +12,11 @@ import (
|
||||
)
|
||||
|
||||
type ContainElementMatcher struct {
|
||||
Element interface{}
|
||||
Result []interface{}
|
||||
Element any
|
||||
Result []any
|
||||
}
|
||||
|
||||
func (matcher *ContainElementMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *ContainElementMatcher) Match(actual any) (success bool, err error) {
|
||||
if !isArrayOrSlice(actual) && !isMap(actual) && !miter.IsIter(actual) {
|
||||
return false, fmt.Errorf("ContainElement matcher expects an array/slice/map/iterator. Got:\n%s", format.Object(actual, 1))
|
||||
}
|
||||
@ -132,14 +132,14 @@ func (matcher *ContainElementMatcher) Match(actual interface{}) (success bool, e
|
||||
var lastError error
|
||||
|
||||
if !miter.IsIter(actual) {
|
||||
var valueAt func(int) interface{}
|
||||
var valueAt func(int) any
|
||||
var foundAt func(int)
|
||||
// We're dealing with an array/slice/map, so in all cases we can iterate
|
||||
// over the elements in actual using indices (that can be considered
|
||||
// keys in case of maps).
|
||||
if isMap(actual) {
|
||||
keys := value.MapKeys()
|
||||
valueAt = func(i int) interface{} {
|
||||
valueAt = func(i int) any {
|
||||
return value.MapIndex(keys[i]).Interface()
|
||||
}
|
||||
if result.Kind() != reflect.Invalid {
|
||||
@ -150,7 +150,7 @@ func (matcher *ContainElementMatcher) Match(actual interface{}) (success bool, e
|
||||
}
|
||||
}
|
||||
} else {
|
||||
valueAt = func(i int) interface{} {
|
||||
valueAt = func(i int) any {
|
||||
return value.Index(i).Interface()
|
||||
}
|
||||
if result.Kind() != reflect.Invalid {
|
||||
@ -251,7 +251,7 @@ func (matcher *ContainElementMatcher) Match(actual interface{}) (success bool, e
|
||||
}
|
||||
|
||||
// pick up any findings the test is interested in as it specified a non-nil
|
||||
// result reference. However, the expection always is that there are at
|
||||
// result reference. However, the expectation always is that there are at
|
||||
// least one or multiple findings. So, if a result is expected, but we had
|
||||
// no findings, then this is an error.
|
||||
findings := getFindings()
|
||||
@ -284,10 +284,10 @@ func (matcher *ContainElementMatcher) Match(actual interface{}) (success bool, e
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (matcher *ContainElementMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *ContainElementMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to contain element matching", matcher.Element)
|
||||
}
|
||||
|
||||
func (matcher *ContainElementMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *ContainElementMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to contain element matching", matcher.Element)
|
||||
}
|
||||
|
10
e2e/vendor/github.com/onsi/gomega/matchers/contain_elements_matcher.go
generated
vendored
10
e2e/vendor/github.com/onsi/gomega/matchers/contain_elements_matcher.go
generated
vendored
@ -9,11 +9,11 @@ import (
|
||||
)
|
||||
|
||||
type ContainElementsMatcher struct {
|
||||
Elements []interface{}
|
||||
missingElements []interface{}
|
||||
Elements []any
|
||||
missingElements []any
|
||||
}
|
||||
|
||||
func (matcher *ContainElementsMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *ContainElementsMatcher) Match(actual any) (success bool, err error) {
|
||||
if !isArrayOrSlice(actual) && !isMap(actual) && !miter.IsIter(actual) {
|
||||
return false, fmt.Errorf("ContainElements matcher expects an array/slice/map/iter.Seq/iter.Seq2. Got:\n%s", format.Object(actual, 1))
|
||||
}
|
||||
@ -35,11 +35,11 @@ func (matcher *ContainElementsMatcher) Match(actual interface{}) (success bool,
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (matcher *ContainElementsMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *ContainElementsMatcher) FailureMessage(actual any) (message string) {
|
||||
message = format.Message(actual, "to contain elements", presentable(matcher.Elements))
|
||||
return appendMissingElements(message, matcher.missingElements)
|
||||
}
|
||||
|
||||
func (matcher *ContainElementsMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *ContainElementsMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to contain elements", presentable(matcher.Elements))
|
||||
}
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go
generated
vendored
@ -11,10 +11,10 @@ import (
|
||||
|
||||
type ContainSubstringMatcher struct {
|
||||
Substr string
|
||||
Args []interface{}
|
||||
Args []any
|
||||
}
|
||||
|
||||
func (matcher *ContainSubstringMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *ContainSubstringMatcher) Match(actual any) (success bool, err error) {
|
||||
actualString, ok := toString(actual)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("ContainSubstring matcher requires a string or stringer. Got:\n%s", format.Object(actual, 1))
|
||||
@ -31,10 +31,10 @@ func (matcher *ContainSubstringMatcher) stringToMatch() string {
|
||||
return stringToMatch
|
||||
}
|
||||
|
||||
func (matcher *ContainSubstringMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *ContainSubstringMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to contain substring", matcher.stringToMatch())
|
||||
}
|
||||
|
||||
func (matcher *ContainSubstringMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *ContainSubstringMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to contain substring", matcher.stringToMatch())
|
||||
}
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/equal_matcher.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/equal_matcher.go
generated
vendored
@ -9,10 +9,10 @@ import (
|
||||
)
|
||||
|
||||
type EqualMatcher struct {
|
||||
Expected interface{}
|
||||
Expected any
|
||||
}
|
||||
|
||||
func (matcher *EqualMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *EqualMatcher) Match(actual any) (success bool, err error) {
|
||||
if actual == nil && matcher.Expected == nil {
|
||||
return false, fmt.Errorf("Refusing to compare <nil> to <nil>.\nBe explicit and use BeNil() instead. This is to avoid mistakes where both sides of an assertion are erroneously uninitialized.")
|
||||
}
|
||||
@ -27,7 +27,7 @@ func (matcher *EqualMatcher) Match(actual interface{}) (success bool, err error)
|
||||
return reflect.DeepEqual(actual, matcher.Expected), nil
|
||||
}
|
||||
|
||||
func (matcher *EqualMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *EqualMatcher) FailureMessage(actual any) (message string) {
|
||||
actualString, actualOK := actual.(string)
|
||||
expectedString, expectedOK := matcher.Expected.(string)
|
||||
if actualOK && expectedOK {
|
||||
@ -37,6 +37,6 @@ func (matcher *EqualMatcher) FailureMessage(actual interface{}) (message string)
|
||||
return format.Message(actual, "to equal", matcher.Expected)
|
||||
}
|
||||
|
||||
func (matcher *EqualMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *EqualMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to equal", matcher.Expected)
|
||||
}
|
||||
|
6
e2e/vendor/github.com/onsi/gomega/matchers/have_cap_matcher.go
generated
vendored
6
e2e/vendor/github.com/onsi/gomega/matchers/have_cap_matcher.go
generated
vendored
@ -12,7 +12,7 @@ type HaveCapMatcher struct {
|
||||
Count int
|
||||
}
|
||||
|
||||
func (matcher *HaveCapMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *HaveCapMatcher) Match(actual any) (success bool, err error) {
|
||||
length, ok := capOf(actual)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("HaveCap matcher expects a array/channel/slice. Got:\n%s", format.Object(actual, 1))
|
||||
@ -21,10 +21,10 @@ func (matcher *HaveCapMatcher) Match(actual interface{}) (success bool, err erro
|
||||
return length == matcher.Count, nil
|
||||
}
|
||||
|
||||
func (matcher *HaveCapMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveCapMatcher) FailureMessage(actual any) (message string) {
|
||||
return fmt.Sprintf("Expected\n%s\nto have capacity %d", format.Object(actual, 1), matcher.Count)
|
||||
}
|
||||
|
||||
func (matcher *HaveCapMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveCapMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return fmt.Sprintf("Expected\n%s\nnot to have capacity %d", format.Object(actual, 1), matcher.Count)
|
||||
}
|
||||
|
14
e2e/vendor/github.com/onsi/gomega/matchers/have_each_matcher.go
generated
vendored
14
e2e/vendor/github.com/onsi/gomega/matchers/have_each_matcher.go
generated
vendored
@ -9,10 +9,10 @@ import (
|
||||
)
|
||||
|
||||
type HaveEachMatcher struct {
|
||||
Element interface{}
|
||||
Element any
|
||||
}
|
||||
|
||||
func (matcher *HaveEachMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *HaveEachMatcher) Match(actual any) (success bool, err error) {
|
||||
if !isArrayOrSlice(actual) && !isMap(actual) && !miter.IsIter(actual) {
|
||||
return false, fmt.Errorf("HaveEach matcher expects an array/slice/map/iter.Seq/iter.Seq2. Got:\n%s",
|
||||
format.Object(actual, 1))
|
||||
@ -61,14 +61,14 @@ func (matcher *HaveEachMatcher) Match(actual interface{}) (success bool, err err
|
||||
format.Object(actual, 1))
|
||||
}
|
||||
|
||||
var valueAt func(int) interface{}
|
||||
var valueAt func(int) any
|
||||
if isMap(actual) {
|
||||
keys := value.MapKeys()
|
||||
valueAt = func(i int) interface{} {
|
||||
valueAt = func(i int) any {
|
||||
return value.MapIndex(keys[i]).Interface()
|
||||
}
|
||||
} else {
|
||||
valueAt = func(i int) interface{} {
|
||||
valueAt = func(i int) any {
|
||||
return value.Index(i).Interface()
|
||||
}
|
||||
}
|
||||
@ -89,11 +89,11 @@ func (matcher *HaveEachMatcher) Match(actual interface{}) (success bool, err err
|
||||
}
|
||||
|
||||
// FailureMessage returns a suitable failure message.
|
||||
func (matcher *HaveEachMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveEachMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to contain element matching", matcher.Element)
|
||||
}
|
||||
|
||||
// NegatedFailureMessage returns a suitable negated failure message.
|
||||
func (matcher *HaveEachMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveEachMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to contain element matching", matcher.Element)
|
||||
}
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/have_exact_elements.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/have_exact_elements.go
generated
vendored
@ -14,13 +14,13 @@ type mismatchFailure struct {
|
||||
}
|
||||
|
||||
type HaveExactElementsMatcher struct {
|
||||
Elements []interface{}
|
||||
Elements []any
|
||||
mismatchFailures []mismatchFailure
|
||||
missingIndex int
|
||||
extraIndex int
|
||||
}
|
||||
|
||||
func (matcher *HaveExactElementsMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *HaveExactElementsMatcher) Match(actual any) (success bool, err error) {
|
||||
matcher.resetState()
|
||||
|
||||
if isMap(actual) || miter.IsSeq2(actual) {
|
||||
@ -108,7 +108,7 @@ func (matcher *HaveExactElementsMatcher) Match(actual interface{}) (success bool
|
||||
return success, nil
|
||||
}
|
||||
|
||||
func (matcher *HaveExactElementsMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveExactElementsMatcher) FailureMessage(actual any) (message string) {
|
||||
message = format.Message(actual, "to have exact elements with", presentable(matcher.Elements))
|
||||
if matcher.missingIndex > 0 {
|
||||
message = fmt.Sprintf("%s\nthe missing elements start from index %d", message, matcher.missingIndex)
|
||||
@ -125,7 +125,7 @@ func (matcher *HaveExactElementsMatcher) FailureMessage(actual interface{}) (mes
|
||||
return
|
||||
}
|
||||
|
||||
func (matcher *HaveExactElementsMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveExactElementsMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to contain elements", presentable(matcher.Elements))
|
||||
}
|
||||
|
||||
|
6
e2e/vendor/github.com/onsi/gomega/matchers/have_existing_field_matcher.go
generated
vendored
6
e2e/vendor/github.com/onsi/gomega/matchers/have_existing_field_matcher.go
generated
vendored
@ -11,7 +11,7 @@ type HaveExistingFieldMatcher struct {
|
||||
Field string
|
||||
}
|
||||
|
||||
func (matcher *HaveExistingFieldMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *HaveExistingFieldMatcher) Match(actual any) (success bool, err error) {
|
||||
// we don't care about the field's actual value, just about any error in
|
||||
// trying to find the field (or method).
|
||||
_, err = extractField(actual, matcher.Field, "HaveExistingField")
|
||||
@ -27,10 +27,10 @@ func (matcher *HaveExistingFieldMatcher) Match(actual interface{}) (success bool
|
||||
return false, err
|
||||
}
|
||||
|
||||
func (matcher *HaveExistingFieldMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveExistingFieldMatcher) FailureMessage(actual any) (message string) {
|
||||
return fmt.Sprintf("Expected\n%s\nto have field '%s'", format.Object(actual, 1), matcher.Field)
|
||||
}
|
||||
|
||||
func (matcher *HaveExistingFieldMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveExistingFieldMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return fmt.Sprintf("Expected\n%s\nnot to have field '%s'", format.Object(actual, 1), matcher.Field)
|
||||
}
|
||||
|
10
e2e/vendor/github.com/onsi/gomega/matchers/have_field.go
generated
vendored
10
e2e/vendor/github.com/onsi/gomega/matchers/have_field.go
generated
vendored
@ -17,7 +17,7 @@ func (e missingFieldError) Error() string {
|
||||
return string(e)
|
||||
}
|
||||
|
||||
func extractField(actual interface{}, field string, matchername string) (any, error) {
|
||||
func extractField(actual any, field string, matchername string) (any, error) {
|
||||
fields := strings.SplitN(field, ".", 2)
|
||||
actualValue := reflect.ValueOf(actual)
|
||||
|
||||
@ -68,7 +68,7 @@ func extractField(actual interface{}, field string, matchername string) (any, er
|
||||
|
||||
type HaveFieldMatcher struct {
|
||||
Field string
|
||||
Expected interface{}
|
||||
Expected any
|
||||
}
|
||||
|
||||
func (matcher *HaveFieldMatcher) expectedMatcher() omegaMatcher {
|
||||
@ -80,7 +80,7 @@ func (matcher *HaveFieldMatcher) expectedMatcher() omegaMatcher {
|
||||
return expectedMatcher
|
||||
}
|
||||
|
||||
func (matcher *HaveFieldMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *HaveFieldMatcher) Match(actual any) (success bool, err error) {
|
||||
extractedField, err := extractField(actual, matcher.Field, "HaveField")
|
||||
if err != nil {
|
||||
return false, err
|
||||
@ -89,7 +89,7 @@ func (matcher *HaveFieldMatcher) Match(actual interface{}) (success bool, err er
|
||||
return matcher.expectedMatcher().Match(extractedField)
|
||||
}
|
||||
|
||||
func (matcher *HaveFieldMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveFieldMatcher) FailureMessage(actual any) (message string) {
|
||||
extractedField, err := extractField(actual, matcher.Field, "HaveField")
|
||||
if err != nil {
|
||||
// this really shouldn't happen
|
||||
@ -101,7 +101,7 @@ func (matcher *HaveFieldMatcher) FailureMessage(actual interface{}) (message str
|
||||
return message
|
||||
}
|
||||
|
||||
func (matcher *HaveFieldMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveFieldMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
extractedField, err := extractField(actual, matcher.Field, "HaveField")
|
||||
if err != nil {
|
||||
// this really shouldn't happen
|
||||
|
12
e2e/vendor/github.com/onsi/gomega/matchers/have_http_body_matcher.go
generated
vendored
12
e2e/vendor/github.com/onsi/gomega/matchers/have_http_body_matcher.go
generated
vendored
@ -11,12 +11,12 @@ import (
|
||||
)
|
||||
|
||||
type HaveHTTPBodyMatcher struct {
|
||||
Expected interface{}
|
||||
cachedResponse interface{}
|
||||
Expected any
|
||||
cachedResponse any
|
||||
cachedBody []byte
|
||||
}
|
||||
|
||||
func (matcher *HaveHTTPBodyMatcher) Match(actual interface{}) (bool, error) {
|
||||
func (matcher *HaveHTTPBodyMatcher) Match(actual any) (bool, error) {
|
||||
body, err := matcher.body(actual)
|
||||
if err != nil {
|
||||
return false, err
|
||||
@ -34,7 +34,7 @@ func (matcher *HaveHTTPBodyMatcher) Match(actual interface{}) (bool, error) {
|
||||
}
|
||||
}
|
||||
|
||||
func (matcher *HaveHTTPBodyMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveHTTPBodyMatcher) FailureMessage(actual any) (message string) {
|
||||
body, err := matcher.body(actual)
|
||||
if err != nil {
|
||||
return fmt.Sprintf("failed to read body: %s", err)
|
||||
@ -52,7 +52,7 @@ func (matcher *HaveHTTPBodyMatcher) FailureMessage(actual interface{}) (message
|
||||
}
|
||||
}
|
||||
|
||||
func (matcher *HaveHTTPBodyMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveHTTPBodyMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
body, err := matcher.body(actual)
|
||||
if err != nil {
|
||||
return fmt.Sprintf("failed to read body: %s", err)
|
||||
@ -73,7 +73,7 @@ func (matcher *HaveHTTPBodyMatcher) NegatedFailureMessage(actual interface{}) (m
|
||||
// body returns the body. It is cached because once we read it in Match()
|
||||
// the Reader is closed and it is not readable again in FailureMessage()
|
||||
// or NegatedFailureMessage()
|
||||
func (matcher *HaveHTTPBodyMatcher) body(actual interface{}) ([]byte, error) {
|
||||
func (matcher *HaveHTTPBodyMatcher) body(actual any) ([]byte, error) {
|
||||
if matcher.cachedResponse == actual && matcher.cachedBody != nil {
|
||||
return matcher.cachedBody, nil
|
||||
}
|
||||
|
10
e2e/vendor/github.com/onsi/gomega/matchers/have_http_header_with_value_matcher.go
generated
vendored
10
e2e/vendor/github.com/onsi/gomega/matchers/have_http_header_with_value_matcher.go
generated
vendored
@ -11,10 +11,10 @@ import (
|
||||
|
||||
type HaveHTTPHeaderWithValueMatcher struct {
|
||||
Header string
|
||||
Value interface{}
|
||||
Value any
|
||||
}
|
||||
|
||||
func (matcher *HaveHTTPHeaderWithValueMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *HaveHTTPHeaderWithValueMatcher) Match(actual any) (success bool, err error) {
|
||||
headerValue, err := matcher.extractHeader(actual)
|
||||
if err != nil {
|
||||
return false, err
|
||||
@ -28,7 +28,7 @@ func (matcher *HaveHTTPHeaderWithValueMatcher) Match(actual interface{}) (succes
|
||||
return headerMatcher.Match(headerValue)
|
||||
}
|
||||
|
||||
func (matcher *HaveHTTPHeaderWithValueMatcher) FailureMessage(actual interface{}) string {
|
||||
func (matcher *HaveHTTPHeaderWithValueMatcher) FailureMessage(actual any) string {
|
||||
headerValue, err := matcher.extractHeader(actual)
|
||||
if err != nil {
|
||||
panic(err) // protected by Match()
|
||||
@ -43,7 +43,7 @@ func (matcher *HaveHTTPHeaderWithValueMatcher) FailureMessage(actual interface{}
|
||||
return fmt.Sprintf("HTTP header %q:\n%s", matcher.Header, diff)
|
||||
}
|
||||
|
||||
func (matcher *HaveHTTPHeaderWithValueMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveHTTPHeaderWithValueMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
headerValue, err := matcher.extractHeader(actual)
|
||||
if err != nil {
|
||||
panic(err) // protected by Match()
|
||||
@ -69,7 +69,7 @@ func (matcher *HaveHTTPHeaderWithValueMatcher) getSubMatcher() (types.GomegaMatc
|
||||
}
|
||||
}
|
||||
|
||||
func (matcher *HaveHTTPHeaderWithValueMatcher) extractHeader(actual interface{}) (string, error) {
|
||||
func (matcher *HaveHTTPHeaderWithValueMatcher) extractHeader(actual any) (string, error) {
|
||||
switch r := actual.(type) {
|
||||
case *http.Response:
|
||||
return r.Header.Get(matcher.Header), nil
|
||||
|
10
e2e/vendor/github.com/onsi/gomega/matchers/have_http_status_matcher.go
generated
vendored
10
e2e/vendor/github.com/onsi/gomega/matchers/have_http_status_matcher.go
generated
vendored
@ -12,10 +12,10 @@ import (
|
||||
)
|
||||
|
||||
type HaveHTTPStatusMatcher struct {
|
||||
Expected []interface{}
|
||||
Expected []any
|
||||
}
|
||||
|
||||
func (matcher *HaveHTTPStatusMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *HaveHTTPStatusMatcher) Match(actual any) (success bool, err error) {
|
||||
var resp *http.Response
|
||||
switch a := actual.(type) {
|
||||
case *http.Response:
|
||||
@ -48,11 +48,11 @@ func (matcher *HaveHTTPStatusMatcher) Match(actual interface{}) (success bool, e
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (matcher *HaveHTTPStatusMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveHTTPStatusMatcher) FailureMessage(actual any) (message string) {
|
||||
return fmt.Sprintf("Expected\n%s\n%s\n%s", formatHttpResponse(actual), "to have HTTP status", matcher.expectedString())
|
||||
}
|
||||
|
||||
func (matcher *HaveHTTPStatusMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveHTTPStatusMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return fmt.Sprintf("Expected\n%s\n%s\n%s", formatHttpResponse(actual), "not to have HTTP status", matcher.expectedString())
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ func (matcher *HaveHTTPStatusMatcher) expectedString() string {
|
||||
return strings.Join(lines, "\n")
|
||||
}
|
||||
|
||||
func formatHttpResponse(input interface{}) string {
|
||||
func formatHttpResponse(input any) string {
|
||||
var resp *http.Response
|
||||
switch r := input.(type) {
|
||||
case *http.Response:
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/have_key_matcher.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/have_key_matcher.go
generated
vendored
@ -11,10 +11,10 @@ import (
|
||||
)
|
||||
|
||||
type HaveKeyMatcher struct {
|
||||
Key interface{}
|
||||
Key any
|
||||
}
|
||||
|
||||
func (matcher *HaveKeyMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *HaveKeyMatcher) Match(actual any) (success bool, err error) {
|
||||
if !isMap(actual) && !miter.IsSeq2(actual) {
|
||||
return false, fmt.Errorf("HaveKey matcher expects a map/iter.Seq2. Got:%s", format.Object(actual, 1))
|
||||
}
|
||||
@ -52,7 +52,7 @@ func (matcher *HaveKeyMatcher) Match(actual interface{}) (success bool, err erro
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (matcher *HaveKeyMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveKeyMatcher) FailureMessage(actual any) (message string) {
|
||||
switch matcher.Key.(type) {
|
||||
case omegaMatcher:
|
||||
return format.Message(actual, "to have key matching", matcher.Key)
|
||||
@ -61,7 +61,7 @@ func (matcher *HaveKeyMatcher) FailureMessage(actual interface{}) (message strin
|
||||
}
|
||||
}
|
||||
|
||||
func (matcher *HaveKeyMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveKeyMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
switch matcher.Key.(type) {
|
||||
case omegaMatcher:
|
||||
return format.Message(actual, "not to have key matching", matcher.Key)
|
||||
|
12
e2e/vendor/github.com/onsi/gomega/matchers/have_key_with_value_matcher.go
generated
vendored
12
e2e/vendor/github.com/onsi/gomega/matchers/have_key_with_value_matcher.go
generated
vendored
@ -11,11 +11,11 @@ import (
|
||||
)
|
||||
|
||||
type HaveKeyWithValueMatcher struct {
|
||||
Key interface{}
|
||||
Value interface{}
|
||||
Key any
|
||||
Value any
|
||||
}
|
||||
|
||||
func (matcher *HaveKeyWithValueMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *HaveKeyWithValueMatcher) Match(actual any) (success bool, err error) {
|
||||
if !isMap(actual) && !miter.IsSeq2(actual) {
|
||||
return false, fmt.Errorf("HaveKeyWithValue matcher expects a map/iter.Seq2. Got:%s", format.Object(actual, 1))
|
||||
}
|
||||
@ -70,7 +70,7 @@ func (matcher *HaveKeyWithValueMatcher) Match(actual interface{}) (success bool,
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (matcher *HaveKeyWithValueMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveKeyWithValueMatcher) FailureMessage(actual any) (message string) {
|
||||
str := "to have {key: value}"
|
||||
if _, ok := matcher.Key.(omegaMatcher); ok {
|
||||
str += " matching"
|
||||
@ -78,12 +78,12 @@ func (matcher *HaveKeyWithValueMatcher) FailureMessage(actual interface{}) (mess
|
||||
str += " matching"
|
||||
}
|
||||
|
||||
expect := make(map[interface{}]interface{}, 1)
|
||||
expect := make(map[any]any, 1)
|
||||
expect[matcher.Key] = matcher.Value
|
||||
return format.Message(actual, str, expect)
|
||||
}
|
||||
|
||||
func (matcher *HaveKeyWithValueMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveKeyWithValueMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
kStr := "not to have key"
|
||||
if _, ok := matcher.Key.(omegaMatcher); ok {
|
||||
kStr = "not to have key matching"
|
||||
|
6
e2e/vendor/github.com/onsi/gomega/matchers/have_len_matcher.go
generated
vendored
6
e2e/vendor/github.com/onsi/gomega/matchers/have_len_matcher.go
generated
vendored
@ -10,7 +10,7 @@ type HaveLenMatcher struct {
|
||||
Count int
|
||||
}
|
||||
|
||||
func (matcher *HaveLenMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *HaveLenMatcher) Match(actual any) (success bool, err error) {
|
||||
length, ok := lengthOf(actual)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("HaveLen matcher expects a string/array/map/channel/slice/iterator. Got:\n%s", format.Object(actual, 1))
|
||||
@ -19,10 +19,10 @@ func (matcher *HaveLenMatcher) Match(actual interface{}) (success bool, err erro
|
||||
return length == matcher.Count, nil
|
||||
}
|
||||
|
||||
func (matcher *HaveLenMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveLenMatcher) FailureMessage(actual any) (message string) {
|
||||
return fmt.Sprintf("Expected\n%s\nto have length %d", format.Object(actual, 1), matcher.Count)
|
||||
}
|
||||
|
||||
func (matcher *HaveLenMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveLenMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return fmt.Sprintf("Expected\n%s\nnot to have length %d", format.Object(actual, 1), matcher.Count)
|
||||
}
|
||||
|
6
e2e/vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go
generated
vendored
6
e2e/vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go
generated
vendored
@ -11,7 +11,7 @@ import (
|
||||
type HaveOccurredMatcher struct {
|
||||
}
|
||||
|
||||
func (matcher *HaveOccurredMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *HaveOccurredMatcher) Match(actual any) (success bool, err error) {
|
||||
// is purely nil?
|
||||
if actual == nil {
|
||||
return false, nil
|
||||
@ -26,10 +26,10 @@ func (matcher *HaveOccurredMatcher) Match(actual interface{}) (success bool, err
|
||||
return !isNil(actual), nil
|
||||
}
|
||||
|
||||
func (matcher *HaveOccurredMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveOccurredMatcher) FailureMessage(actual any) (message string) {
|
||||
return fmt.Sprintf("Expected an error to have occurred. Got:\n%s", format.Object(actual, 1))
|
||||
}
|
||||
|
||||
func (matcher *HaveOccurredMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveOccurredMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return fmt.Sprintf("Unexpected error:\n%s\n%s", format.Object(actual, 1), "occurred")
|
||||
}
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go
generated
vendored
@ -8,10 +8,10 @@ import (
|
||||
|
||||
type HavePrefixMatcher struct {
|
||||
Prefix string
|
||||
Args []interface{}
|
||||
Args []any
|
||||
}
|
||||
|
||||
func (matcher *HavePrefixMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *HavePrefixMatcher) Match(actual any) (success bool, err error) {
|
||||
actualString, ok := toString(actual)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("HavePrefix matcher requires a string or stringer. Got:\n%s", format.Object(actual, 1))
|
||||
@ -27,10 +27,10 @@ func (matcher *HavePrefixMatcher) prefix() string {
|
||||
return matcher.Prefix
|
||||
}
|
||||
|
||||
func (matcher *HavePrefixMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HavePrefixMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to have prefix", matcher.prefix())
|
||||
}
|
||||
|
||||
func (matcher *HavePrefixMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HavePrefixMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to have prefix", matcher.prefix())
|
||||
}
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go
generated
vendored
@ -8,10 +8,10 @@ import (
|
||||
|
||||
type HaveSuffixMatcher struct {
|
||||
Suffix string
|
||||
Args []interface{}
|
||||
Args []any
|
||||
}
|
||||
|
||||
func (matcher *HaveSuffixMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *HaveSuffixMatcher) Match(actual any) (success bool, err error) {
|
||||
actualString, ok := toString(actual)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("HaveSuffix matcher requires a string or stringer. Got:\n%s", format.Object(actual, 1))
|
||||
@ -27,10 +27,10 @@ func (matcher *HaveSuffixMatcher) suffix() string {
|
||||
return matcher.Suffix
|
||||
}
|
||||
|
||||
func (matcher *HaveSuffixMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveSuffixMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to have suffix", matcher.suffix())
|
||||
}
|
||||
|
||||
func (matcher *HaveSuffixMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *HaveSuffixMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to have suffix", matcher.suffix())
|
||||
}
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/have_value.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/have_value.go
generated
vendored
@ -12,10 +12,10 @@ const maxIndirections = 31
|
||||
|
||||
type HaveValueMatcher struct {
|
||||
Matcher types.GomegaMatcher // the matcher to apply to the "resolved" actual value.
|
||||
resolvedActual interface{} // the ("resolved") value.
|
||||
resolvedActual any // the ("resolved") value.
|
||||
}
|
||||
|
||||
func (m *HaveValueMatcher) Match(actual interface{}) (bool, error) {
|
||||
func (m *HaveValueMatcher) Match(actual any) (bool, error) {
|
||||
val := reflect.ValueOf(actual)
|
||||
for allowedIndirs := maxIndirections; allowedIndirs > 0; allowedIndirs-- {
|
||||
// return an error if value isn't valid. Please note that we cannot
|
||||
@ -45,10 +45,10 @@ func (m *HaveValueMatcher) Match(actual interface{}) (bool, error) {
|
||||
return false, errors.New(format.Message(actual, "too many indirections"))
|
||||
}
|
||||
|
||||
func (m *HaveValueMatcher) FailureMessage(_ interface{}) (message string) {
|
||||
func (m *HaveValueMatcher) FailureMessage(_ any) (message string) {
|
||||
return m.Matcher.FailureMessage(m.resolvedActual)
|
||||
}
|
||||
|
||||
func (m *HaveValueMatcher) NegatedFailureMessage(_ interface{}) (message string) {
|
||||
func (m *HaveValueMatcher) NegatedFailureMessage(_ any) (message string) {
|
||||
return m.Matcher.NegatedFailureMessage(m.resolvedActual)
|
||||
}
|
||||
|
4
e2e/vendor/github.com/onsi/gomega/matchers/match_error_matcher.go
generated
vendored
4
e2e/vendor/github.com/onsi/gomega/matchers/match_error_matcher.go
generated
vendored
@ -71,14 +71,14 @@ func (matcher *MatchErrorMatcher) Match(actual any) (success bool, err error) {
|
||||
format.Object(expected, 1))
|
||||
}
|
||||
|
||||
func (matcher *MatchErrorMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *MatchErrorMatcher) FailureMessage(actual any) (message string) {
|
||||
if matcher.isFunc {
|
||||
return format.Message(actual, fmt.Sprintf("to match error function %s", matcher.FuncErrDescription[0]))
|
||||
}
|
||||
return format.Message(actual, "to match error", matcher.Expected)
|
||||
}
|
||||
|
||||
func (matcher *MatchErrorMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *MatchErrorMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
if matcher.isFunc {
|
||||
return format.Message(actual, fmt.Sprintf("not to match error function %s", matcher.FuncErrDescription[0]))
|
||||
}
|
||||
|
16
e2e/vendor/github.com/onsi/gomega/matchers/match_json_matcher.go
generated
vendored
16
e2e/vendor/github.com/onsi/gomega/matchers/match_json_matcher.go
generated
vendored
@ -9,18 +9,18 @@ import (
|
||||
)
|
||||
|
||||
type MatchJSONMatcher struct {
|
||||
JSONToMatch interface{}
|
||||
firstFailurePath []interface{}
|
||||
JSONToMatch any
|
||||
firstFailurePath []any
|
||||
}
|
||||
|
||||
func (matcher *MatchJSONMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *MatchJSONMatcher) Match(actual any) (success bool, err error) {
|
||||
actualString, expectedString, err := matcher.prettyPrint(actual)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
var aval interface{}
|
||||
var eval interface{}
|
||||
var aval any
|
||||
var eval any
|
||||
|
||||
// this is guarded by prettyPrint
|
||||
json.Unmarshal([]byte(actualString), &aval)
|
||||
@ -30,17 +30,17 @@ func (matcher *MatchJSONMatcher) Match(actual interface{}) (success bool, err er
|
||||
return equal, nil
|
||||
}
|
||||
|
||||
func (matcher *MatchJSONMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *MatchJSONMatcher) FailureMessage(actual any) (message string) {
|
||||
actualString, expectedString, _ := matcher.prettyPrint(actual)
|
||||
return formattedMessage(format.Message(actualString, "to match JSON of", expectedString), matcher.firstFailurePath)
|
||||
}
|
||||
|
||||
func (matcher *MatchJSONMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *MatchJSONMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
actualString, expectedString, _ := matcher.prettyPrint(actual)
|
||||
return formattedMessage(format.Message(actualString, "not to match JSON of", expectedString), matcher.firstFailurePath)
|
||||
}
|
||||
|
||||
func (matcher *MatchJSONMatcher) prettyPrint(actual interface{}) (actualFormatted, expectedFormatted string, err error) {
|
||||
func (matcher *MatchJSONMatcher) prettyPrint(actual any) (actualFormatted, expectedFormatted string, err error) {
|
||||
actualString, ok := toString(actual)
|
||||
if !ok {
|
||||
return "", "", fmt.Errorf("MatchJSONMatcher matcher requires a string, stringer, or []byte. Got actual:\n%s", format.Object(actual, 1))
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go
generated
vendored
@ -9,10 +9,10 @@ import (
|
||||
|
||||
type MatchRegexpMatcher struct {
|
||||
Regexp string
|
||||
Args []interface{}
|
||||
Args []any
|
||||
}
|
||||
|
||||
func (matcher *MatchRegexpMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *MatchRegexpMatcher) Match(actual any) (success bool, err error) {
|
||||
actualString, ok := toString(actual)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("RegExp matcher requires a string or stringer.\nGot:%s", format.Object(actual, 1))
|
||||
@ -26,11 +26,11 @@ func (matcher *MatchRegexpMatcher) Match(actual interface{}) (success bool, err
|
||||
return match, nil
|
||||
}
|
||||
|
||||
func (matcher *MatchRegexpMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *MatchRegexpMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to match regular expression", matcher.regexp())
|
||||
}
|
||||
|
||||
func (matcher *MatchRegexpMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *MatchRegexpMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "not to match regular expression", matcher.regexp())
|
||||
}
|
||||
|
||||
|
10
e2e/vendor/github.com/onsi/gomega/matchers/match_xml_matcher.go
generated
vendored
10
e2e/vendor/github.com/onsi/gomega/matchers/match_xml_matcher.go
generated
vendored
@ -15,10 +15,10 @@ import (
|
||||
)
|
||||
|
||||
type MatchXMLMatcher struct {
|
||||
XMLToMatch interface{}
|
||||
XMLToMatch any
|
||||
}
|
||||
|
||||
func (matcher *MatchXMLMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *MatchXMLMatcher) Match(actual any) (success bool, err error) {
|
||||
actualString, expectedString, err := matcher.formattedPrint(actual)
|
||||
if err != nil {
|
||||
return false, err
|
||||
@ -37,17 +37,17 @@ func (matcher *MatchXMLMatcher) Match(actual interface{}) (success bool, err err
|
||||
return reflect.DeepEqual(aval, eval), nil
|
||||
}
|
||||
|
||||
func (matcher *MatchXMLMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *MatchXMLMatcher) FailureMessage(actual any) (message string) {
|
||||
actualString, expectedString, _ := matcher.formattedPrint(actual)
|
||||
return fmt.Sprintf("Expected\n%s\nto match XML of\n%s", actualString, expectedString)
|
||||
}
|
||||
|
||||
func (matcher *MatchXMLMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *MatchXMLMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
actualString, expectedString, _ := matcher.formattedPrint(actual)
|
||||
return fmt.Sprintf("Expected\n%s\nnot to match XML of\n%s", actualString, expectedString)
|
||||
}
|
||||
|
||||
func (matcher *MatchXMLMatcher) formattedPrint(actual interface{}) (actualString, expectedString string, err error) {
|
||||
func (matcher *MatchXMLMatcher) formattedPrint(actual any) (actualString, expectedString string, err error) {
|
||||
var ok bool
|
||||
actualString, ok = toString(actual)
|
||||
if !ok {
|
||||
|
20
e2e/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go
generated
vendored
20
e2e/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go
generated
vendored
@ -9,18 +9,18 @@ import (
|
||||
)
|
||||
|
||||
type MatchYAMLMatcher struct {
|
||||
YAMLToMatch interface{}
|
||||
firstFailurePath []interface{}
|
||||
YAMLToMatch any
|
||||
firstFailurePath []any
|
||||
}
|
||||
|
||||
func (matcher *MatchYAMLMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *MatchYAMLMatcher) Match(actual any) (success bool, err error) {
|
||||
actualString, expectedString, err := matcher.toStrings(actual)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
var aval interface{}
|
||||
var eval interface{}
|
||||
var aval any
|
||||
var eval any
|
||||
|
||||
if err := yaml.Unmarshal([]byte(actualString), &aval); err != nil {
|
||||
return false, fmt.Errorf("Actual '%s' should be valid YAML, but it is not.\nUnderlying error:%s", actualString, err)
|
||||
@ -34,23 +34,23 @@ func (matcher *MatchYAMLMatcher) Match(actual interface{}) (success bool, err er
|
||||
return equal, nil
|
||||
}
|
||||
|
||||
func (matcher *MatchYAMLMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *MatchYAMLMatcher) FailureMessage(actual any) (message string) {
|
||||
actualString, expectedString, _ := matcher.toNormalisedStrings(actual)
|
||||
return formattedMessage(format.Message(actualString, "to match YAML of", expectedString), matcher.firstFailurePath)
|
||||
}
|
||||
|
||||
func (matcher *MatchYAMLMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *MatchYAMLMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
actualString, expectedString, _ := matcher.toNormalisedStrings(actual)
|
||||
return formattedMessage(format.Message(actualString, "not to match YAML of", expectedString), matcher.firstFailurePath)
|
||||
}
|
||||
|
||||
func (matcher *MatchYAMLMatcher) toNormalisedStrings(actual interface{}) (actualFormatted, expectedFormatted string, err error) {
|
||||
func (matcher *MatchYAMLMatcher) toNormalisedStrings(actual any) (actualFormatted, expectedFormatted string, err error) {
|
||||
actualString, expectedString, err := matcher.toStrings(actual)
|
||||
return normalise(actualString), normalise(expectedString), err
|
||||
}
|
||||
|
||||
func normalise(input string) string {
|
||||
var val interface{}
|
||||
var val any
|
||||
err := yaml.Unmarshal([]byte(input), &val)
|
||||
if err != nil {
|
||||
panic(err) // unreachable since Match already calls Unmarshal
|
||||
@ -62,7 +62,7 @@ func normalise(input string) string {
|
||||
return strings.TrimSpace(string(output))
|
||||
}
|
||||
|
||||
func (matcher *MatchYAMLMatcher) toStrings(actual interface{}) (actualFormatted, expectedFormatted string, err error) {
|
||||
func (matcher *MatchYAMLMatcher) toStrings(actual any) (actualFormatted, expectedFormatted string, err error) {
|
||||
actualString, ok := toString(actual)
|
||||
if !ok {
|
||||
return "", "", fmt.Errorf("MatchYAMLMatcher matcher requires a string, stringer, or []byte. Got actual:\n%s", format.Object(actual, 1))
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/not.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/not.go
generated
vendored
@ -8,7 +8,7 @@ type NotMatcher struct {
|
||||
Matcher types.GomegaMatcher
|
||||
}
|
||||
|
||||
func (m *NotMatcher) Match(actual interface{}) (bool, error) {
|
||||
func (m *NotMatcher) Match(actual any) (bool, error) {
|
||||
success, err := m.Matcher.Match(actual)
|
||||
if err != nil {
|
||||
return false, err
|
||||
@ -16,14 +16,14 @@ func (m *NotMatcher) Match(actual interface{}) (bool, error) {
|
||||
return !success, nil
|
||||
}
|
||||
|
||||
func (m *NotMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (m *NotMatcher) FailureMessage(actual any) (message string) {
|
||||
return m.Matcher.NegatedFailureMessage(actual) // works beautifully
|
||||
}
|
||||
|
||||
func (m *NotMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (m *NotMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return m.Matcher.FailureMessage(actual) // works beautifully
|
||||
}
|
||||
|
||||
func (m *NotMatcher) MatchMayChangeInTheFuture(actual interface{}) bool {
|
||||
func (m *NotMatcher) MatchMayChangeInTheFuture(actual any) bool {
|
||||
return types.MatchMayChangeInTheFuture(m.Matcher, actual) // just return m.Matcher's value
|
||||
}
|
||||
|
8
e2e/vendor/github.com/onsi/gomega/matchers/or.go
generated
vendored
8
e2e/vendor/github.com/onsi/gomega/matchers/or.go
generated
vendored
@ -14,7 +14,7 @@ type OrMatcher struct {
|
||||
firstSuccessfulMatcher types.GomegaMatcher
|
||||
}
|
||||
|
||||
func (m *OrMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (m *OrMatcher) Match(actual any) (success bool, err error) {
|
||||
m.firstSuccessfulMatcher = nil
|
||||
for _, matcher := range m.Matchers {
|
||||
success, err := matcher.Match(actual)
|
||||
@ -29,16 +29,16 @@ func (m *OrMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (m *OrMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (m *OrMatcher) FailureMessage(actual any) (message string) {
|
||||
// not the most beautiful list of matchers, but not bad either...
|
||||
return format.Message(actual, fmt.Sprintf("To satisfy at least one of these matchers: %s", m.Matchers))
|
||||
}
|
||||
|
||||
func (m *OrMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (m *OrMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return m.firstSuccessfulMatcher.NegatedFailureMessage(actual)
|
||||
}
|
||||
|
||||
func (m *OrMatcher) MatchMayChangeInTheFuture(actual interface{}) bool {
|
||||
func (m *OrMatcher) MatchMayChangeInTheFuture(actual any) bool {
|
||||
/*
|
||||
Example with 3 matchers: A, B, C
|
||||
|
||||
|
10
e2e/vendor/github.com/onsi/gomega/matchers/panic_matcher.go
generated
vendored
10
e2e/vendor/github.com/onsi/gomega/matchers/panic_matcher.go
generated
vendored
@ -8,11 +8,11 @@ import (
|
||||
)
|
||||
|
||||
type PanicMatcher struct {
|
||||
Expected interface{}
|
||||
object interface{}
|
||||
Expected any
|
||||
object any
|
||||
}
|
||||
|
||||
func (matcher *PanicMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *PanicMatcher) Match(actual any) (success bool, err error) {
|
||||
if actual == nil {
|
||||
return false, fmt.Errorf("PanicMatcher expects a non-nil actual.")
|
||||
}
|
||||
@ -52,7 +52,7 @@ func (matcher *PanicMatcher) Match(actual interface{}) (success bool, err error)
|
||||
return
|
||||
}
|
||||
|
||||
func (matcher *PanicMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *PanicMatcher) FailureMessage(actual any) (message string) {
|
||||
if matcher.Expected == nil {
|
||||
// We wanted any panic to occur, but none did.
|
||||
return format.Message(actual, "to panic")
|
||||
@ -91,7 +91,7 @@ func (matcher *PanicMatcher) FailureMessage(actual interface{}) (message string)
|
||||
}
|
||||
}
|
||||
|
||||
func (matcher *PanicMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *PanicMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
if matcher.Expected == nil {
|
||||
// We didn't want any panic to occur, but one did.
|
||||
return format.Message(actual, fmt.Sprintf("not to panic, but panicked with\n%s", format.Object(matcher.object, 1)))
|
||||
|
16
e2e/vendor/github.com/onsi/gomega/matchers/receive_matcher.go
generated
vendored
16
e2e/vendor/github.com/onsi/gomega/matchers/receive_matcher.go
generated
vendored
@ -11,12 +11,12 @@ import (
|
||||
)
|
||||
|
||||
type ReceiveMatcher struct {
|
||||
Args []interface{}
|
||||
Args []any
|
||||
receivedValue reflect.Value
|
||||
channelClosed bool
|
||||
}
|
||||
|
||||
func (matcher *ReceiveMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *ReceiveMatcher) Match(actual any) (success bool, err error) {
|
||||
if !isChan(actual) {
|
||||
return false, fmt.Errorf("ReceiveMatcher expects a channel. Got:\n%s", format.Object(actual, 1))
|
||||
}
|
||||
@ -30,7 +30,7 @@ func (matcher *ReceiveMatcher) Match(actual interface{}) (success bool, err erro
|
||||
|
||||
var subMatcher omegaMatcher
|
||||
var hasSubMatcher bool
|
||||
var resultReference interface{}
|
||||
var resultReference any
|
||||
|
||||
// Valid arg formats are as follows, always with optional POINTER before
|
||||
// optional MATCHER:
|
||||
@ -115,8 +115,8 @@ func (matcher *ReceiveMatcher) Match(actual interface{}) (success bool, err erro
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (matcher *ReceiveMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
var matcherArg interface{}
|
||||
func (matcher *ReceiveMatcher) FailureMessage(actual any) (message string) {
|
||||
var matcherArg any
|
||||
if len(matcher.Args) > 0 {
|
||||
matcherArg = matcher.Args[len(matcher.Args)-1]
|
||||
}
|
||||
@ -136,8 +136,8 @@ func (matcher *ReceiveMatcher) FailureMessage(actual interface{}) (message strin
|
||||
return format.Message(actual, "to receive something."+closedAddendum)
|
||||
}
|
||||
|
||||
func (matcher *ReceiveMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
var matcherArg interface{}
|
||||
func (matcher *ReceiveMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
var matcherArg any
|
||||
if len(matcher.Args) > 0 {
|
||||
matcherArg = matcher.Args[len(matcher.Args)-1]
|
||||
}
|
||||
@ -157,7 +157,7 @@ func (matcher *ReceiveMatcher) NegatedFailureMessage(actual interface{}) (messag
|
||||
return format.Message(actual, "not to receive anything."+closedAddendum)
|
||||
}
|
||||
|
||||
func (matcher *ReceiveMatcher) MatchMayChangeInTheFuture(actual interface{}) bool {
|
||||
func (matcher *ReceiveMatcher) MatchMayChangeInTheFuture(actual any) bool {
|
||||
if !isChan(actual) {
|
||||
return false
|
||||
}
|
||||
|
10
e2e/vendor/github.com/onsi/gomega/matchers/satisfy_matcher.go
generated
vendored
10
e2e/vendor/github.com/onsi/gomega/matchers/satisfy_matcher.go
generated
vendored
@ -8,13 +8,13 @@ import (
|
||||
)
|
||||
|
||||
type SatisfyMatcher struct {
|
||||
Predicate interface{}
|
||||
Predicate any
|
||||
|
||||
// cached type
|
||||
predicateArgType reflect.Type
|
||||
}
|
||||
|
||||
func NewSatisfyMatcher(predicate interface{}) *SatisfyMatcher {
|
||||
func NewSatisfyMatcher(predicate any) *SatisfyMatcher {
|
||||
if predicate == nil {
|
||||
panic("predicate cannot be nil")
|
||||
}
|
||||
@ -35,7 +35,7 @@ func NewSatisfyMatcher(predicate interface{}) *SatisfyMatcher {
|
||||
}
|
||||
}
|
||||
|
||||
func (m *SatisfyMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (m *SatisfyMatcher) Match(actual any) (success bool, err error) {
|
||||
// prepare a parameter to pass to the predicate
|
||||
var param reflect.Value
|
||||
if actual != nil && reflect.TypeOf(actual).AssignableTo(m.predicateArgType) {
|
||||
@ -57,10 +57,10 @@ func (m *SatisfyMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
return result[0].Bool(), nil
|
||||
}
|
||||
|
||||
func (m *SatisfyMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (m *SatisfyMatcher) FailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to satisfy predicate", m.Predicate)
|
||||
}
|
||||
|
||||
func (m *SatisfyMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (m *SatisfyMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return format.Message(actual, "to not satisfy predicate", m.Predicate)
|
||||
}
|
||||
|
32
e2e/vendor/github.com/onsi/gomega/matchers/semi_structured_data_support.go
generated
vendored
32
e2e/vendor/github.com/onsi/gomega/matchers/semi_structured_data_support.go
generated
vendored
@ -8,7 +8,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
func formattedMessage(comparisonMessage string, failurePath []interface{}) string {
|
||||
func formattedMessage(comparisonMessage string, failurePath []any) string {
|
||||
var diffMessage string
|
||||
if len(failurePath) == 0 {
|
||||
diffMessage = ""
|
||||
@ -18,7 +18,7 @@ func formattedMessage(comparisonMessage string, failurePath []interface{}) strin
|
||||
return fmt.Sprintf("%s%s", comparisonMessage, diffMessage)
|
||||
}
|
||||
|
||||
func formattedFailurePath(failurePath []interface{}) string {
|
||||
func formattedFailurePath(failurePath []any) string {
|
||||
formattedPaths := []string{}
|
||||
for i := len(failurePath) - 1; i >= 0; i-- {
|
||||
switch p := failurePath[i].(type) {
|
||||
@ -34,33 +34,33 @@ func formattedFailurePath(failurePath []interface{}) string {
|
||||
return strings.Join(formattedPaths, "")
|
||||
}
|
||||
|
||||
func deepEqual(a interface{}, b interface{}) (bool, []interface{}) {
|
||||
var errorPath []interface{}
|
||||
func deepEqual(a any, b any) (bool, []any) {
|
||||
var errorPath []any
|
||||
if reflect.TypeOf(a) != reflect.TypeOf(b) {
|
||||
return false, errorPath
|
||||
}
|
||||
|
||||
switch a.(type) {
|
||||
case []interface{}:
|
||||
if len(a.([]interface{})) != len(b.([]interface{})) {
|
||||
case []any:
|
||||
if len(a.([]any)) != len(b.([]any)) {
|
||||
return false, errorPath
|
||||
}
|
||||
|
||||
for i, v := range a.([]interface{}) {
|
||||
elementEqual, keyPath := deepEqual(v, b.([]interface{})[i])
|
||||
for i, v := range a.([]any) {
|
||||
elementEqual, keyPath := deepEqual(v, b.([]any)[i])
|
||||
if !elementEqual {
|
||||
return false, append(keyPath, i)
|
||||
}
|
||||
}
|
||||
return true, errorPath
|
||||
|
||||
case map[interface{}]interface{}:
|
||||
if len(a.(map[interface{}]interface{})) != len(b.(map[interface{}]interface{})) {
|
||||
case map[any]any:
|
||||
if len(a.(map[any]any)) != len(b.(map[any]any)) {
|
||||
return false, errorPath
|
||||
}
|
||||
|
||||
for k, v1 := range a.(map[interface{}]interface{}) {
|
||||
v2, ok := b.(map[interface{}]interface{})[k]
|
||||
for k, v1 := range a.(map[any]any) {
|
||||
v2, ok := b.(map[any]any)[k]
|
||||
if !ok {
|
||||
return false, errorPath
|
||||
}
|
||||
@ -71,13 +71,13 @@ func deepEqual(a interface{}, b interface{}) (bool, []interface{}) {
|
||||
}
|
||||
return true, errorPath
|
||||
|
||||
case map[string]interface{}:
|
||||
if len(a.(map[string]interface{})) != len(b.(map[string]interface{})) {
|
||||
case map[string]any:
|
||||
if len(a.(map[string]any)) != len(b.(map[string]any)) {
|
||||
return false, errorPath
|
||||
}
|
||||
|
||||
for k, v1 := range a.(map[string]interface{}) {
|
||||
v2, ok := b.(map[string]interface{})[k]
|
||||
for k, v1 := range a.(map[string]any) {
|
||||
v2, ok := b.(map[string]any)[k]
|
||||
if !ok {
|
||||
return false, errorPath
|
||||
}
|
||||
|
6
e2e/vendor/github.com/onsi/gomega/matchers/succeed_matcher.go
generated
vendored
6
e2e/vendor/github.com/onsi/gomega/matchers/succeed_matcher.go
generated
vendored
@ -14,7 +14,7 @@ type formattedGomegaError interface {
|
||||
type SucceedMatcher struct {
|
||||
}
|
||||
|
||||
func (matcher *SucceedMatcher) Match(actual interface{}) (success bool, err error) {
|
||||
func (matcher *SucceedMatcher) Match(actual any) (success bool, err error) {
|
||||
// is purely nil?
|
||||
if actual == nil {
|
||||
return true, nil
|
||||
@ -29,7 +29,7 @@ func (matcher *SucceedMatcher) Match(actual interface{}) (success bool, err erro
|
||||
return isNil(actual), nil
|
||||
}
|
||||
|
||||
func (matcher *SucceedMatcher) FailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *SucceedMatcher) FailureMessage(actual any) (message string) {
|
||||
var fgErr formattedGomegaError
|
||||
if errors.As(actual.(error), &fgErr) {
|
||||
return fgErr.FormattedGomegaError()
|
||||
@ -37,6 +37,6 @@ func (matcher *SucceedMatcher) FailureMessage(actual interface{}) (message strin
|
||||
return fmt.Sprintf("Expected success, but got an error:\n%s", format.Object(actual, 1))
|
||||
}
|
||||
|
||||
func (matcher *SucceedMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
||||
func (matcher *SucceedMatcher) NegatedFailureMessage(actual any) (message string) {
|
||||
return "Expected failure, but got no error."
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ type BipartiteGraph struct {
|
||||
Edges EdgeSet
|
||||
}
|
||||
|
||||
func NewBipartiteGraph(leftValues, rightValues []interface{}, neighbours func(interface{}, interface{}) (bool, error)) (*BipartiteGraph, error) {
|
||||
func NewBipartiteGraph(leftValues, rightValues []any, neighbours func(any, any) (bool, error)) (*BipartiteGraph, error) {
|
||||
left := NodeOrderedSet{}
|
||||
for i, v := range leftValues {
|
||||
left = append(left, Node{ID: i, Value: v})
|
||||
@ -41,7 +41,7 @@ func NewBipartiteGraph(leftValues, rightValues []interface{}, neighbours func(in
|
||||
|
||||
// FreeLeftRight returns left node values and right node values
|
||||
// of the BipartiteGraph's nodes which are not part of the given edges.
|
||||
func (bg *BipartiteGraph) FreeLeftRight(edges EdgeSet) (leftValues, rightValues []interface{}) {
|
||||
func (bg *BipartiteGraph) FreeLeftRight(edges EdgeSet) (leftValues, rightValues []any) {
|
||||
for _, node := range bg.Left {
|
||||
if edges.Free(node) {
|
||||
leftValues = append(leftValues, node.Value)
|
||||
|
2
e2e/vendor/github.com/onsi/gomega/matchers/support/goraph/node/node.go
generated
vendored
2
e2e/vendor/github.com/onsi/gomega/matchers/support/goraph/node/node.go
generated
vendored
@ -2,7 +2,7 @@ package node
|
||||
|
||||
type Node struct {
|
||||
ID int
|
||||
Value interface{}
|
||||
Value any
|
||||
}
|
||||
|
||||
type NodeOrderedSet []Node
|
||||
|
40
e2e/vendor/github.com/onsi/gomega/matchers/type_support.go
generated
vendored
40
e2e/vendor/github.com/onsi/gomega/matchers/type_support.go
generated
vendored
@ -20,16 +20,16 @@ import (
|
||||
)
|
||||
|
||||
type omegaMatcher interface {
|
||||
Match(actual interface{}) (success bool, err error)
|
||||
FailureMessage(actual interface{}) (message string)
|
||||
NegatedFailureMessage(actual interface{}) (message string)
|
||||
Match(actual any) (success bool, err error)
|
||||
FailureMessage(actual any) (message string)
|
||||
NegatedFailureMessage(actual any) (message string)
|
||||
}
|
||||
|
||||
func isBool(a interface{}) bool {
|
||||
func isBool(a any) bool {
|
||||
return reflect.TypeOf(a).Kind() == reflect.Bool
|
||||
}
|
||||
|
||||
func isNumber(a interface{}) bool {
|
||||
func isNumber(a any) bool {
|
||||
if a == nil {
|
||||
return false
|
||||
}
|
||||
@ -37,22 +37,22 @@ func isNumber(a interface{}) bool {
|
||||
return reflect.Int <= kind && kind <= reflect.Float64
|
||||
}
|
||||
|
||||
func isInteger(a interface{}) bool {
|
||||
func isInteger(a any) bool {
|
||||
kind := reflect.TypeOf(a).Kind()
|
||||
return reflect.Int <= kind && kind <= reflect.Int64
|
||||
}
|
||||
|
||||
func isUnsignedInteger(a interface{}) bool {
|
||||
func isUnsignedInteger(a any) bool {
|
||||
kind := reflect.TypeOf(a).Kind()
|
||||
return reflect.Uint <= kind && kind <= reflect.Uint64
|
||||
}
|
||||
|
||||
func isFloat(a interface{}) bool {
|
||||
func isFloat(a any) bool {
|
||||
kind := reflect.TypeOf(a).Kind()
|
||||
return reflect.Float32 <= kind && kind <= reflect.Float64
|
||||
}
|
||||
|
||||
func toInteger(a interface{}) int64 {
|
||||
func toInteger(a any) int64 {
|
||||
if isInteger(a) {
|
||||
return reflect.ValueOf(a).Int()
|
||||
} else if isUnsignedInteger(a) {
|
||||
@ -63,7 +63,7 @@ func toInteger(a interface{}) int64 {
|
||||
panic(fmt.Sprintf("Expected a number! Got <%T> %#v", a, a))
|
||||
}
|
||||
|
||||
func toUnsignedInteger(a interface{}) uint64 {
|
||||
func toUnsignedInteger(a any) uint64 {
|
||||
if isInteger(a) {
|
||||
return uint64(reflect.ValueOf(a).Int())
|
||||
} else if isUnsignedInteger(a) {
|
||||
@ -74,7 +74,7 @@ func toUnsignedInteger(a interface{}) uint64 {
|
||||
panic(fmt.Sprintf("Expected a number! Got <%T> %#v", a, a))
|
||||
}
|
||||
|
||||
func toFloat(a interface{}) float64 {
|
||||
func toFloat(a any) float64 {
|
||||
if isInteger(a) {
|
||||
return float64(reflect.ValueOf(a).Int())
|
||||
} else if isUnsignedInteger(a) {
|
||||
@ -85,26 +85,26 @@ func toFloat(a interface{}) float64 {
|
||||
panic(fmt.Sprintf("Expected a number! Got <%T> %#v", a, a))
|
||||
}
|
||||
|
||||
func isError(a interface{}) bool {
|
||||
func isError(a any) bool {
|
||||
_, ok := a.(error)
|
||||
return ok
|
||||
}
|
||||
|
||||
func isChan(a interface{}) bool {
|
||||
func isChan(a any) bool {
|
||||
if isNil(a) {
|
||||
return false
|
||||
}
|
||||
return reflect.TypeOf(a).Kind() == reflect.Chan
|
||||
}
|
||||
|
||||
func isMap(a interface{}) bool {
|
||||
func isMap(a any) bool {
|
||||
if a == nil {
|
||||
return false
|
||||
}
|
||||
return reflect.TypeOf(a).Kind() == reflect.Map
|
||||
}
|
||||
|
||||
func isArrayOrSlice(a interface{}) bool {
|
||||
func isArrayOrSlice(a any) bool {
|
||||
if a == nil {
|
||||
return false
|
||||
}
|
||||
@ -116,14 +116,14 @@ func isArrayOrSlice(a interface{}) bool {
|
||||
}
|
||||
}
|
||||
|
||||
func isString(a interface{}) bool {
|
||||
func isString(a any) bool {
|
||||
if a == nil {
|
||||
return false
|
||||
}
|
||||
return reflect.TypeOf(a).Kind() == reflect.String
|
||||
}
|
||||
|
||||
func toString(a interface{}) (string, bool) {
|
||||
func toString(a any) (string, bool) {
|
||||
aString, isString := a.(string)
|
||||
if isString {
|
||||
return aString, true
|
||||
@ -147,7 +147,7 @@ func toString(a interface{}) (string, bool) {
|
||||
return "", false
|
||||
}
|
||||
|
||||
func lengthOf(a interface{}) (int, bool) {
|
||||
func lengthOf(a any) (int, bool) {
|
||||
if a == nil {
|
||||
return 0, false
|
||||
}
|
||||
@ -169,7 +169,7 @@ func lengthOf(a interface{}) (int, bool) {
|
||||
return 0, false
|
||||
}
|
||||
}
|
||||
func capOf(a interface{}) (int, bool) {
|
||||
func capOf(a any) (int, bool) {
|
||||
if a == nil {
|
||||
return 0, false
|
||||
}
|
||||
@ -181,7 +181,7 @@ func capOf(a interface{}) (int, bool) {
|
||||
}
|
||||
}
|
||||
|
||||
func isNil(a interface{}) bool {
|
||||
func isNil(a any) bool {
|
||||
if a == nil {
|
||||
return true
|
||||
}
|
||||
|
14
e2e/vendor/github.com/onsi/gomega/matchers/with_transform.go
generated
vendored
14
e2e/vendor/github.com/onsi/gomega/matchers/with_transform.go
generated
vendored
@ -9,20 +9,20 @@ import (
|
||||
|
||||
type WithTransformMatcher struct {
|
||||
// input
|
||||
Transform interface{} // must be a function of one parameter that returns one value and an optional error
|
||||
Transform any // must be a function of one parameter that returns one value and an optional error
|
||||
Matcher types.GomegaMatcher
|
||||
|
||||
// cached value
|
||||
transformArgType reflect.Type
|
||||
|
||||
// state
|
||||
transformedValue interface{}
|
||||
transformedValue any
|
||||
}
|
||||
|
||||
// reflect.Type for error
|
||||
var errorT = reflect.TypeOf((*error)(nil)).Elem()
|
||||
|
||||
func NewWithTransformMatcher(transform interface{}, matcher types.GomegaMatcher) *WithTransformMatcher {
|
||||
func NewWithTransformMatcher(transform any, matcher types.GomegaMatcher) *WithTransformMatcher {
|
||||
if transform == nil {
|
||||
panic("transform function cannot be nil")
|
||||
}
|
||||
@ -43,7 +43,7 @@ func NewWithTransformMatcher(transform interface{}, matcher types.GomegaMatcher)
|
||||
}
|
||||
}
|
||||
|
||||
func (m *WithTransformMatcher) Match(actual interface{}) (bool, error) {
|
||||
func (m *WithTransformMatcher) Match(actual any) (bool, error) {
|
||||
// prepare a parameter to pass to the Transform function
|
||||
var param reflect.Value
|
||||
if actual != nil && reflect.TypeOf(actual).AssignableTo(m.transformArgType) {
|
||||
@ -72,15 +72,15 @@ func (m *WithTransformMatcher) Match(actual interface{}) (bool, error) {
|
||||
return m.Matcher.Match(m.transformedValue)
|
||||
}
|
||||
|
||||
func (m *WithTransformMatcher) FailureMessage(_ interface{}) (message string) {
|
||||
func (m *WithTransformMatcher) FailureMessage(_ any) (message string) {
|
||||
return m.Matcher.FailureMessage(m.transformedValue)
|
||||
}
|
||||
|
||||
func (m *WithTransformMatcher) NegatedFailureMessage(_ interface{}) (message string) {
|
||||
func (m *WithTransformMatcher) NegatedFailureMessage(_ any) (message string) {
|
||||
return m.Matcher.NegatedFailureMessage(m.transformedValue)
|
||||
}
|
||||
|
||||
func (m *WithTransformMatcher) MatchMayChangeInTheFuture(_ interface{}) bool {
|
||||
func (m *WithTransformMatcher) MatchMayChangeInTheFuture(_ any) bool {
|
||||
// TODO: Maybe this should always just return true? (Only an issue for non-deterministic transformers.)
|
||||
//
|
||||
// Querying the next matcher is fine if the transformer always will return the same value.
|
||||
|
Reference in New Issue
Block a user