Skip to content

Commit

Permalink
turn on remote stop_test
Browse files Browse the repository at this point in the history
turn on stop_test  --cidfile

Signed-off-by: Qi Wang <[email protected]>
  • Loading branch information
QiWang19 committed Jun 3, 2020
1 parent 9bd48a6 commit e77db14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 8 additions & 0 deletions pkg/domain/infra/tunnel/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/stop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ var _ = Describe("Podman stop", func() {
})

It("podman stop --cidfile", func() {
SkipIfRemote()

tmpDir, err := ioutil.TempDir("", "")
Expect(err).To(BeNil())
Expand All @@ -258,7 +257,6 @@ var _ = Describe("Podman stop", func() {
})

It("podman stop multiple --cidfile", func() {
SkipIfRemote()

tmpDir, err := ioutil.TempDir("", "")
Expect(err).To(BeNil())
Expand Down

0 comments on commit e77db14

Please sign in to comment.