request.ReadBody already closes the body;
time="2025-03-20T19:08:25Z" level=error msg="subsequent attempt to close ReadCloserWrapper"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -59,7 +59,6 @@ func (s *DockerAPISuite) TestAPIClientVersionOldNotSupported(c *testing.T) {
|
| 59 | 59 |
|
| 60 | 60 |
resp, body, err := request.Get(testutil.GetContext(c), "/v"+version+"/version") |
| 61 | 61 |
assert.NilError(c, err) |
| 62 |
- defer body.Close() |
|
| 63 | 62 |
assert.Equal(c, resp.StatusCode, http.StatusBadRequest) |
| 64 | 63 |
expected := fmt.Sprintf("client version %s is too old. Minimum supported API version is %s, please upgrade your client to a newer version", version, testEnv.DaemonVersion.MinAPIVersion)
|
| 65 | 64 |
b, err := request.ReadBody(body) |