Skip to content

Commit

Permalink
Update to latest internal module
Browse files Browse the repository at this point in the history
Add test for ResponseError with nil response body.
  • Loading branch information
jhendrixMSFT committed Feb 2, 2024
1 parent 299ebfe commit 3da4192
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions sdk/azcore/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

### Other Changes

* Update to latest version of `internal`.

## 1.9.1 (2023-12-11)

### Bugs Fixed
Expand Down
2 changes: 2 additions & 0 deletions sdk/azcore/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions sdk/azcore/go.sum
Original file line number Diff line number Diff line change
@@ -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=
Expand Down
5 changes: 5 additions & 0 deletions sdk/azcore/internal/exported/response_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

0 comments on commit 3da4192

Please sign in to comment.