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:
Sebastiaan van Stijn
2025-03-20 20:16:12 +01:00
parent 1c00755826
commit c7fbe1c2ba
2 changed files with 0 additions and 2 deletions

View File

@@ -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)

View File

@@ -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)