diff options
author | Qi Wang <qiwan@redhat.com> | 2020-06-02 18:01:57 -0400 |
---|---|---|
committer | Qi Wang <qiwan@redhat.com> | 2020-06-02 19:12:31 -0400 |
commit | 5473ba95d729b9583c2c5a159a8be61a3a242949 (patch) | |
tree | debaa2bff4a57a296a57c05b6afca0e7764181fa | |
parent | 95ea39edf34e4de4450c1674721ab02a7cf6a327 (diff) | |
download | podman-5473ba95d729b9583c2c5a159a8be61a3a242949.tar.gz podman-5473ba95d729b9583c2c5a159a8be61a3a242949.tar.bz2 podman-5473ba95d729b9583c2c5a159a8be61a3a242949.zip |
Turn on remote rm_test --cidfile
Turn on remote rm_test --cidfile
Signed-off-by: Qi Wang <qiwan@redhat.com>
-rw-r--r-- | pkg/domain/infra/tunnel/containers.go | 9 | ||||
-rw-r--r-- | test/e2e/rm_test.go | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go index af9d94293..97b98eec2 100644 --- a/pkg/domain/infra/tunnel/containers.go +++ b/pkg/domain/infra/tunnel/containers.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "io" + "io/ioutil" "os" "strconv" "strings" @@ -162,6 +163,14 @@ func (ic *ContainerEngine) ContainerRm(ctx context.Context, namesOrIds []string, var ( reports []*entities.RmReport ) + 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/rm_test.go b/test/e2e/rm_test.go index 87e3de922..6b554cd84 100644 --- a/test/e2e/rm_test.go +++ b/test/e2e/rm_test.go @@ -141,7 +141,6 @@ var _ = Describe("Podman rm", func() { }) It("podman rm --cidfile", func() { - SkipIfRemote() tmpDir, err := ioutil.TempDir("", "") Expect(err).To(BeNil()) @@ -164,7 +163,6 @@ var _ = Describe("Podman rm", func() { }) It("podman rm multiple --cidfile", func() { - SkipIfRemote() tmpDir, err := ioutil.TempDir("", "") Expect(err).To(BeNil()) |