mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
client: deprecate NewClientWithOpts in favor of New
Use a more idiomatic name so that it can be used as `client.New()`. We should look if we want `New()` to have different / updated defaults i.e., enable `WithEnv` as default, and have an opt-out and have API- version negotiation enabled by default (with an opt-out option). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -1558,7 +1558,7 @@ func (s *DockerCLIRunSuite) TestRunWithNanoCPUs(c *testing.T) {
|
||||
out := cli.DockerCmd(c, "run", "--cpus", "0.5", "--name", "test", "busybox", "sh", "-c", fmt.Sprintf("cat %s && cat %s", file1, file2)).Combined()
|
||||
assert.Equal(c, strings.TrimSpace(out), "50000\n100000")
|
||||
|
||||
clt, err := client.NewClientWithOpts(client.FromEnv)
|
||||
clt, err := client.New(client.FromEnv)
|
||||
assert.NilError(c, err)
|
||||
res, err := clt.ContainerInspect(testutil.GetContext(c), "test", client.ContainerInspectOptions{})
|
||||
assert.NilError(c, err)
|
||||
|
||||
Reference in New Issue
Block a user