GODT-35: Finish all details and make tests pass

This commit is contained in:
Michal Horejsek
2021-03-11 14:37:15 +01:00
committed by Jakub
parent 2284e9ede1
commit 8109831c07
173 changed files with 4697 additions and 2897 deletions

View File

@ -48,9 +48,11 @@ func (t *fakeTransport) RoundTrip(req *http.Request) (*http.Response, error) {
if err != nil {
return nil, errors.Wrap(err, "failed to get body")
}
body, err = ioutil.ReadAll(bodyReader)
if err != nil {
return nil, errors.Wrap(err, "failed to read body")
if bodyReader != nil {
body, err = ioutil.ReadAll(bodyReader)
if err != nil {
return nil, errors.Wrap(err, "failed to read body")
}
}
}
t.ctl.recordCall(req.Method, req.URL.Path, body)