Merge pull request #6481 from QiWang19/rm-test-stop

turn on remote stop_test
This commit is contained in:
OpenShift Merge Robot
2020-06-04 14:49:35 +02:00
committed by GitHub
2 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -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())