From 3313a658a4f0efab84789cfa69beb79ca822e288 Mon Sep 17 00:00:00 2001 From: Victor <87538976+visill@users.noreply.github.com> Date: Tue, 10 Sep 2024 18:19:26 +0500 Subject: [PATCH] Greening (#763) --- test/feature/testutil/docker_composer.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/feature/testutil/docker_composer.go b/test/feature/testutil/docker_composer.go index b8841170f..20881b35a 100644 --- a/test/feature/testutil/docker_composer.go +++ b/test/feature/testutil/docker_composer.go @@ -211,7 +211,7 @@ func (dc *DockerComposer) RunCommand(service string, cmd string, timeout time.Du } ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel() - execCfg := types.ExecConfig{ + execCfg := container.ExecOptions{ AttachStdout: true, AttachStderr: true, Cmd: []string{shell, "-c", cmd}, @@ -220,7 +220,7 @@ func (dc *DockerComposer) RunCommand(service string, cmd string, timeout time.Du if err != nil { return 0, "", err } - attachResp, err := dc.api.ContainerExecAttach(ctx, execResp.ID, types.ExecStartCheck{}) + attachResp, err := dc.api.ContainerExecAttach(ctx, execResp.ID, container.ExecStartOptions{}) if err != nil { return 0, "", err } @@ -234,7 +234,7 @@ func (dc *DockerComposer) RunCommand(service string, cmd string, timeout time.Du if err != nil { return 0, "", err } - var insp types.ContainerExecInspect + var insp container.ExecInspect Retry(func() bool { insp, err = dc.api.ContainerExecInspect(ctx, execResp.ID) return err != nil || !insp.Running @@ -254,7 +254,7 @@ func (dc *DockerComposer) RunAsyncCommand(service string, cmd string) error { if !ok { return fmt.Errorf("no such service: %s", service) } - execCfg := types.ExecConfig{ + execCfg := container.ExecOptions{ Detach: true, Cmd: []string{shell, "-c", cmd}, } @@ -262,7 +262,7 @@ func (dc *DockerComposer) RunAsyncCommand(service string, cmd string) error { if err != nil { return err } - return dc.api.ContainerExecStart(context.Background(), execResp.ID, types.ExecStartCheck{}) + return dc.api.ContainerExecStart(context.Background(), execResp.ID, container.ExecStartOptions{}) } // GetFile returns content of the fail from continer by path