Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Ziqi Zhao <[email protected]>
  • Loading branch information
fatsheep9146 committed Jul 18, 2022
1 parent e5ec09d commit c7567ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/confighttp/compression_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ func TestHTTPContentCompressionRequestWithNilBody(t *testing.T) {
}

func TestHTTPContentCompressionCopyError(t *testing.T) {
testBody := bytes.NewBuffer([]byte("test"))
copyErrorCompressRoundTripper := &compressRoundTripper{
RoundTripper: http.DefaultTransport,
compressionType: "copyFailed",
Expand All @@ -273,7 +274,7 @@ func TestHTTPContentCompressionCopyError(t *testing.T) {
}))
defer server.Close()

req, err := http.NewRequest("GET", server.URL, nil)
req, err := http.NewRequest("GET", server.URL, testBody)
require.NoError(t, err, "failed to create request to test handler")

client := http.Client{}
Expand Down

0 comments on commit c7567ac

Please sign in to comment.