From e77db144ab817a0e4c9f53c98abed511ce30baf7 Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Wed, 3 Jun 2020 12:55:43 -0400 Subject: turn on remote stop_test turn on stop_test --cidfile Signed-off-by: Qi Wang --- pkg/domain/infra/tunnel/containers.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pkg/domain') diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go index 97b98eec2..36a510081 100644 --- a/pkg/domain/infra/tunnel/containers.go +++ b/pkg/domain/infra/tunnel/containers.go @@ -86,6 +86,14 @@ func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []strin var ( reports []*entities.StopReport ) + for _, cidFile := range options.CIDFiles { + content, err := ioutil.ReadFile(cidFile) + if err != nil { + return nil, errors.Wrapf(err, "error reading CIDFile %s", cidFile) + } + id := strings.Split(string(content), "\n")[0] + namesOrIds = append(namesOrIds, id) + } ctrs, err := getContainersByContext(ic.ClientCxt, options.All, namesOrIds) if err != nil { return nil, err -- cgit v1.2.3-54-g00ecf