From 59a2c785bfba56e2ffb04083c213fa2ad23a36a2 Mon Sep 17 00:00:00 2001 From: Zeling Feng Date: Mon, 30 Nov 2020 21:21:21 -0800 Subject: Do not start a ContainerExec twice ContainerExecStart and ContainerExecAttach both call the /exec/id/start API endpoint. PiperOrigin-RevId: 344946627 --- pkg/test/dockerutil/exec.go | 5 ----- 1 file changed, 5 deletions(-) (limited to 'pkg/test/dockerutil/exec.go') diff --git a/pkg/test/dockerutil/exec.go b/pkg/test/dockerutil/exec.go index 4c739c9e9..bf968acec 100644 --- a/pkg/test/dockerutil/exec.go +++ b/pkg/test/dockerutil/exec.go @@ -77,11 +77,6 @@ func (c *Container) doExec(ctx context.Context, r ExecOpts, args []string) (Proc return Process{}, fmt.Errorf("exec attach failed with err: %v", err) } - if err := c.client.ContainerExecStart(ctx, resp.ID, types.ExecStartCheck{}); err != nil { - hijack.Close() - return Process{}, fmt.Errorf("exec start failed with err: %v", err) - } - return Process{ container: c, execid: resp.ID, -- cgit v1.2.3