Skip to content

Commit

Permalink
Merge pull request #56 from xmidt-org/hotfix/broken-tests
Browse files Browse the repository at this point in the history
Hotfix/broken tests
  • Loading branch information
schmidtw authored Jul 6, 2023
2 parents 33f76c0 + b7bf1ee commit 9218f9e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ func TestFunc(t *testing.T) {

//nolint:bodyclose
actual, actualErr := Func(func(r *http.Request) (*http.Response, error) {
assert.True(request == r)
assert.Same(request, r)
return expected, expectedErr
})(request)
}).Do(request)

assert.True(expected == actual)
assert.Equal(expectedErr, actualErr)
Expand Down
9 changes: 8 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
module github.com/xmidt-org/httpaux

go 1.14
go 1.20

require github.com/stretchr/testify v1.8.0

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
2 changes: 1 addition & 1 deletion roundtrip/middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestFunc(t *testing.T) {
actual, actualErr := Func(func(r *http.Request) (*http.Response, error) {
assert.True(request == r)
return expected, expectedErr
})(request)
}).RoundTrip(request)

assert.True(expected == actual)
assert.Equal(expectedErr, actualErr)
Expand Down

0 comments on commit 9218f9e

Please sign in to comment.