Skip to content

Commit 18b22e0

Browse files
committed
testing
1 parent 2fec54c commit 18b22e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

httpclient/http.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ func (c *ProdExecutor) SetRedirectPolicy(policy *func(req *http.Request, via []*
3939

4040
type MockExecutor struct {
4141
LockedResponseCode int
42+
ResponseBody string
4243
}
4344

4445
func (m *MockExecutor) CloseIdleConnections() {
@@ -54,7 +55,7 @@ func (m *MockExecutor) Do(req *http.Request) (*http.Response, error) {
5455

5556
response := &http.Response{
5657
StatusCode: m.LockedResponseCode,
57-
Body: io.NopCloser(bytes.NewBufferString("nil")),
58+
Body: io.NopCloser(bytes.NewBufferString(m.ResponseBody)),
5859
Header: make(http.Header),
5960
}
6061

0 commit comments

Comments
 (0)