mirror of
https://github.com/moby/moby.git
synced 2026-08-03 22:51:03 +00:00
integration-cli: fix duplicate close of body
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>
This commit is contained in:
@@ -122,7 +122,6 @@ RUN echo 'right'
|
||||
assert.NilError(c, err)
|
||||
assert.Equal(c, res.StatusCode, http.StatusOK)
|
||||
|
||||
defer body.Close()
|
||||
content, err := request.ReadBody(body)
|
||||
assert.NilError(c, err)
|
||||
|
||||
|
||||
@@ -59,7 +59,6 @@ func (s *DockerAPISuite) TestAPIClientVersionOldNotSupported(c *testing.T) {
|
||||
|
||||
resp, body, err := request.Get(testutil.GetContext(c), "/v"+version+"/version")
|
||||
assert.NilError(c, err)
|
||||
defer body.Close()
|
||||
assert.Equal(c, resp.StatusCode, http.StatusBadRequest)
|
||||
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)
|
||||
b, err := request.ReadBody(body)
|
||||
|
||||
Reference in New Issue
Block a user