Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix/broken tests #56

Merged
merged 3 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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