diff --git a/sdk/azcore/CHANGELOG.md b/sdk/azcore/CHANGELOG.md index 55086531a63c..66cefd85a518 100644 --- a/sdk/azcore/CHANGELOG.md +++ b/sdk/azcore/CHANGELOG.md @@ -12,6 +12,8 @@ ### Other Changes +* Update to latest version of `internal`. + ## 1.9.1 (2023-12-11) ### Bugs Fixed diff --git a/sdk/azcore/go.mod b/sdk/azcore/go.mod index 473eb25830cb..d9637f24c1f6 100644 --- a/sdk/azcore/go.mod +++ b/sdk/azcore/go.mod @@ -14,3 +14,5 @@ require ( golang.org/x/text v0.14.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +replace github.com/Azure/azure-sdk-for-go/sdk/internal => ../internal diff --git a/sdk/azcore/go.sum b/sdk/azcore/go.sum index 17b0e77bdf33..8cf56a0b8002 100644 --- a/sdk/azcore/go.sum +++ b/sdk/azcore/go.sum @@ -1,5 +1,3 @@ -github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 h1:6oNBlSdi1QqM1PNW7FPA6xOGA5UNsXnkaYZz9vdPGhA= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1/go.mod h1:s4kgfzA0covAXNicZHDMN58jExvcng2mC/DepXiF1EI= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/sdk/azcore/internal/exported/response_error_test.go b/sdk/azcore/internal/exported/response_error_test.go index dddf35596ee6..49a234a93573 100644 --- a/sdk/azcore/internal/exported/response_error_test.go +++ b/sdk/azcore/internal/exported/response_error_test.go @@ -468,3 +468,8 @@ func TestNilRequestInRawResponse(t *testing.T) { } require.EqualValues(t, expected, respErr.Error()) } + +func TestNilResponseBody(t *testing.T) { + const expected = "Request information not available\n--------------------------------------------------------------------------------\nRESPONSE 0: \nERROR CODE UNAVAILABLE\n--------------------------------------------------------------------------------\nResponse contained no body\n--------------------------------------------------------------------------------\n" + require.EqualValues(t, expected, (&ResponseError{RawResponse: &http.Response{}}).Error()) +}