1
0
mirror of https://github.com/moby/moby.git synced 2025-07-30 18:23:29 +03:00

Remove use of deprecated client.NewClient()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2019-01-21 12:32:56 +01:00
parent 5801c04345
commit 3a4bb96ab7
3 changed files with 3 additions and 7 deletions

View File

@ -1443,8 +1443,7 @@ func (s *DockerSuite) TestPutContainerArchiveErrSymlinkInVolumeToReadOnlyRootfs(
// Attempt to extract to a symlink in the volume which points to a
// directory outside the volume. This should cause an error because the
// rootfs is read-only.
var httpClient *http.Client
cli, err := client.NewClient(request.DaemonHost(), "v1.20", httpClient, map[string]string{})
cli, err := client.NewClientWithOpts(client.FromEnv, client.WithVersion("v1.20"))
c.Assert(err, checker.IsNil)
err = cli.CopyToContainer(context.Background(), cID, "/vol2/symlinkToAbsDir", nil, types.CopyToContainerOptions{})