mirror of
https://github.com/moby/moby.git
synced 2025-07-30 18:23:29 +03:00
Move integration-cli/request to internal/test/request…
… and change a bit the method signature Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
@ -24,7 +24,7 @@ import (
|
||||
"github.com/docker/docker/integration-cli/checker"
|
||||
"github.com/docker/docker/integration-cli/cli"
|
||||
"github.com/docker/docker/integration-cli/cli/build"
|
||||
"github.com/docker/docker/integration-cli/request"
|
||||
"github.com/docker/docker/internal/test/request"
|
||||
"github.com/docker/docker/pkg/ioutils"
|
||||
"github.com/docker/docker/pkg/mount"
|
||||
"github.com/docker/docker/pkg/stringid"
|
||||
@ -1254,13 +1254,13 @@ func (s *DockerSuite) TestContainerAPIChunkedEncoding(c *check.C) {
|
||||
"OpenStdin": true,
|
||||
}
|
||||
|
||||
resp, _, err := request.Post("/containers/create", request.JSONBody(config), func(req *http.Request) error {
|
||||
resp, _, err := request.Post("/containers/create", request.JSONBody(config), request.With(func(req *http.Request) error {
|
||||
// This is a cheat to make the http request do chunked encoding
|
||||
// Otherwise (just setting the Content-Encoding to chunked) net/http will overwrite
|
||||
// https://golang.org/src/pkg/net/http/request.go?s=11980:12172
|
||||
req.ContentLength = -1
|
||||
return nil
|
||||
})
|
||||
}))
|
||||
c.Assert(err, checker.IsNil, check.Commentf("error creating container with chunked encoding"))
|
||||
defer resp.Body.Close()
|
||||
c.Assert(resp.StatusCode, checker.Equals, http.StatusCreated)
|
||||
|
Reference in New Issue
Block a user