diff --git a/go.mod b/go.mod index e13d67e..72e470c 100644 --- a/go.mod +++ b/go.mod @@ -9,8 +9,8 @@ require ( github.com/coreos/go-semver v0.3.1 github.com/maxbrunsfeld/counterfeiter/v6 v6.10.0 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.36.0 - github.com/pivotal-cf/on-demand-services-sdk v0.47.1-0.20241205125254-e2fbcd7db0af + github.com/onsi/gomega v1.36.1 + github.com/pivotal-cf/on-demand-services-sdk v0.47.1-0.20241210124114-f83638d72281 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index 10f3a57..9b1184b 100644 --- a/go.sum +++ b/go.sum @@ -99,14 +99,14 @@ github.com/onsi/ginkgo/v2 v2.22.0 h1:Yed107/8DjTr0lKCNt7Dn8yQ6ybuDRQoMGrNFKzMfHg github.com/onsi/ginkgo/v2 v2.22.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.36.0 h1:Pb12RlruUtj4XUuPUqeEWc6j5DkVVVA49Uf6YLfC95Y= -github.com/onsi/gomega v1.36.0/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= +github.com/onsi/gomega v1.36.1 h1:bJDPBO7ibjxcbHMgSCoo4Yj18UWbKDlLwX1x9sybDcw= +github.com/onsi/gomega v1.36.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= github.com/pierrec/lz4/v4 v4.1.17 h1:kV4Ip+/hUBC+8T6+2EgburRtkE9ef4nbY3f4dFhGjMc= github.com/pierrec/lz4/v4 v4.1.17/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pivotal-cf/brokerapi/v11 v11.0.15 h1:cupAoYkPaO6Xf+HnnRTF9MFuALIZlOmooUaFIJWbXC8= github.com/pivotal-cf/brokerapi/v11 v11.0.15/go.mod h1:LefTwSJILAABVCbL05+N2h9YmebFhAprVn9UdKowodY= -github.com/pivotal-cf/on-demand-services-sdk v0.47.1-0.20241205125254-e2fbcd7db0af h1:F5Xdfz/gccD6r15hgj7fGy07ymy5c7pkXXrDSvkIEiE= -github.com/pivotal-cf/on-demand-services-sdk v0.47.1-0.20241205125254-e2fbcd7db0af/go.mod h1:VJb81c1JIKLJiMpJpwTWtPcivD6Al7XhMTJSveEveGQ= +github.com/pivotal-cf/on-demand-services-sdk v0.47.1-0.20241210124114-f83638d72281 h1:F/GqWEcO87spgzRslRc3T7ioD7ekdc+JrAsDmIHB70Q= +github.com/pivotal-cf/on-demand-services-sdk v0.47.1-0.20241210124114-f83638d72281/go.mod h1:JZeNayMN5k6qXMW9qHwcnHtu4mBi+QrK+1eXyju4uhs= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/vendor/github.com/onsi/gomega/CHANGELOG.md b/vendor/github.com/onsi/gomega/CHANGELOG.md index b797577..79c3f61 100644 --- a/vendor/github.com/onsi/gomega/CHANGELOG.md +++ b/vendor/github.com/onsi/gomega/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.36.1 + +### Fixes +- Fix https://github.com/onsi/gomega/issues/803 [1c6c112] +- resolves onsi/gomega#696: make HaveField great on pointer receivers given only a non-addressable value [4feb9d7] + ## 1.36.0 ### Features diff --git a/vendor/github.com/onsi/gomega/gomega_dsl.go b/vendor/github.com/onsi/gomega/gomega_dsl.go index eb74f6f..c6ac499 100644 --- a/vendor/github.com/onsi/gomega/gomega_dsl.go +++ b/vendor/github.com/onsi/gomega/gomega_dsl.go @@ -22,7 +22,7 @@ import ( "github.com/onsi/gomega/types" ) -const GOMEGA_VERSION = "1.36.0" +const GOMEGA_VERSION = "1.36.1" const nilGomegaPanic = `You are trying to make an assertion, but haven't registered Gomega's fail handler. If you're using Ginkgo then you probably forgot to put your assertion in an It(). diff --git a/vendor/github.com/onsi/gomega/matchers/have_field.go b/vendor/github.com/onsi/gomega/matchers/have_field.go index 8dd3f87..293457e 100644 --- a/vendor/github.com/onsi/gomega/matchers/have_field.go +++ b/vendor/github.com/onsi/gomega/matchers/have_field.go @@ -40,7 +40,12 @@ func extractField(actual interface{}, field string, matchername string) (any, er extractedValue = actualValue.Addr().MethodByName(strings.TrimSuffix(fields[0], "()")) } if extractedValue == (reflect.Value{}) { - return nil, missingFieldError(fmt.Sprintf("%s could not find method named '%s' in struct of type %T.", matchername, fields[0], actual)) + ptr := reflect.New(actualValue.Type()) + ptr.Elem().Set(actualValue) + extractedValue = ptr.MethodByName(strings.TrimSuffix(fields[0], "()")) + if extractedValue == (reflect.Value{}) { + return nil, missingFieldError(fmt.Sprintf("%s could not find method named '%s' in struct of type %T.", matchername, fields[0], actual)) + } } t := extractedValue.Type() if t.NumIn() != 0 || t.NumOut() != 1 { diff --git a/vendor/modules.txt b/vendor/modules.txt index 4dc4805..c3733ff 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -159,7 +159,7 @@ github.com/onsi/ginkgo/reporters/stenographer github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty github.com/onsi/ginkgo/types -# github.com/onsi/gomega v1.36.0 +# github.com/onsi/gomega v1.36.1 ## explicit; go 1.22 github.com/onsi/gomega github.com/onsi/gomega/format @@ -184,7 +184,7 @@ github.com/pierrec/lz4/v4/internal/xxh32 # github.com/pivotal-cf/brokerapi/v11 v11.0.15 ## explicit; go 1.21 github.com/pivotal-cf/brokerapi/v11/domain -# github.com/pivotal-cf/on-demand-services-sdk v0.47.1-0.20241205125254-e2fbcd7db0af +# github.com/pivotal-cf/on-demand-services-sdk v0.47.1-0.20241210124114-f83638d72281 ## explicit; go 1.23 github.com/pivotal-cf/on-demand-services-sdk/bosh github.com/pivotal-cf/on-demand-services-sdk/serviceadapter