diff options
author | Qi Wang <qiwan@redhat.com> | 2020-06-03 12:55:43 -0400 |
---|---|---|
committer | Qi Wang <qiwan@redhat.com> | 2020-06-03 12:55:58 -0400 |
commit | e77db144ab817a0e4c9f53c98abed511ce30baf7 (patch) | |
tree | b5d39a4ae6a94a54d53ee90b03a99e7eb3812e32 | |
parent | 9bd48a64bbe63c0b8da4dfd3841f4d822fa1d5fb (diff) | |
download | podman-e77db144ab817a0e4c9f53c98abed511ce30baf7.tar.gz podman-e77db144ab817a0e4c9f53c98abed511ce30baf7.tar.bz2 podman-e77db144ab817a0e4c9f53c98abed511ce30baf7.zip |
turn on remote stop_test
turn on stop_test --cidfile
Signed-off-by: Qi Wang <qiwan@redhat.com>
-rw-r--r-- | pkg/domain/infra/tunnel/containers.go | 8 | ||||
-rw-r--r-- | test/e2e/stop_test.go | 2 |
2 files changed, 8 insertions, 2 deletions
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 diff --git a/test/e2e/stop_test.go b/test/e2e/stop_test.go index cd78a54e1..4ed0b6293 100644 --- a/test/e2e/stop_test.go +++ b/test/e2e/stop_test.go @@ -233,7 +233,6 @@ var _ = Describe("Podman stop", func() { }) It("podman stop --cidfile", func() { - SkipIfRemote() tmpDir, err := ioutil.TempDir("", "") Expect(err).To(BeNil()) @@ -258,7 +257,6 @@ var _ = Describe("Podman stop", func() { }) It("podman stop multiple --cidfile", func() { - SkipIfRemote() tmpDir, err := ioutil.TempDir("", "") Expect(err).To(BeNil()) |