mirror of
https://github.com/containers/podman.git
synced 2025-06-19 00:06:43 +08:00
turn on remote stop_test
turn on stop_test --cidfile Signed-off-by: Qi Wang <qiwan@redhat.com>
This commit is contained in:
@ -86,6 +86,14 @@ func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []strin
|
|||||||
var (
|
var (
|
||||||
reports []*entities.StopReport
|
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)
|
ctrs, err := getContainersByContext(ic.ClientCxt, options.All, namesOrIds)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -233,7 +233,6 @@ var _ = Describe("Podman stop", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman stop --cidfile", func() {
|
It("podman stop --cidfile", func() {
|
||||||
SkipIfRemote()
|
|
||||||
|
|
||||||
tmpDir, err := ioutil.TempDir("", "")
|
tmpDir, err := ioutil.TempDir("", "")
|
||||||
Expect(err).To(BeNil())
|
Expect(err).To(BeNil())
|
||||||
@ -258,7 +257,6 @@ var _ = Describe("Podman stop", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman stop multiple --cidfile", func() {
|
It("podman stop multiple --cidfile", func() {
|
||||||
SkipIfRemote()
|
|
||||||
|
|
||||||
tmpDir, err := ioutil.TempDir("", "")
|
tmpDir, err := ioutil.TempDir("", "")
|
||||||
Expect(err).To(BeNil())
|
Expect(err).To(BeNil())
|
||||||
|
Reference in New Issue
Block a user