summaryrefslogtreecommitdiff
path: root/testrig
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-05-21 17:59:14 +0100
committerLibravatar GitHub <noreply@github.com>2023-05-21 18:59:14 +0200
commit2063d01cdb02c7ef26dc6d917e3bca252db5d5a8 (patch)
treeae220bc4956beb8bc09e3786f4ba8a0fb99b521b /testrig
parent[feature] Make client IP logging configurable (#1799) (diff)
downloadgotosocial-2063d01cdb02c7ef26dc6d917e3bca252db5d5a8.tar.xz
[bugfix] Add back removed ValidateRequest() before backoff-retry loop (#1805)v0.9.0-rc2
* add back removed ValidateRequest() before backoff-retry loop Signed-off-by: kim <grufwub@gmail.com> * include response body in error response log Signed-off-by: kim <grufwub@gmail.com> * improved error response body draining Signed-off-by: kim <grufwub@gmail.com> * add more code commenting Signed-off-by: kim <grufwub@gmail.com> * move new error response logic to gtserror, handle instead in transport.Transport{} impl Signed-off-by: kim <grufwub@gmail.com> * appease ye oh mighty linter Signed-off-by: kim <grufwub@gmail.com> * fix mockhttpclient not setting request in http response Signed-off-by: kim <grufwub@gmail.com> --------- Signed-off-by: kim <grufwub@gmail.com>
Diffstat (limited to 'testrig')
-rw-r--r--testrig/transportcontroller.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/testrig/transportcontroller.go b/testrig/transportcontroller.go
index b74888934..1c75e1974 100644
--- a/testrig/transportcontroller.go
+++ b/testrig/transportcontroller.go
@@ -209,6 +209,7 @@ func NewMockHTTPClient(do func(req *http.Request) (*http.Response, error), relat
reader := bytes.NewReader(responseBytes)
readCloser := io.NopCloser(reader)
return &http.Response{
+ Request: req,
StatusCode: responseCode,
Body: readCloser,
ContentLength: int64(responseContentLength),