diff options
Diffstat (limited to 'test/e2e/kill_test.go')
-rw-r--r-- | test/e2e/kill_test.go | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/e2e/kill_test.go b/test/e2e/kill_test.go index c1c1b003e..a9f21fa70 100644 --- a/test/e2e/kill_test.go +++ b/test/e2e/kill_test.go @@ -4,7 +4,7 @@ import ( "io/ioutil" "os" - . "github.com/containers/podman/v2/test/utils" + . "github.com/containers/podman/v3/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -51,6 +51,19 @@ var _ = Describe("Podman kill", func() { Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0)) }) + It("podman container kill a running container by short id", func() { + session := podmanTest.RunTopContainer("") + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + cid := session.OutputToString() + + result := podmanTest.Podman([]string{"container", "kill", cid[:5]}) + result.WaitWithDefaultTimeout() + Expect(result.ExitCode()).To(Equal(0)) + Expect(result.OutputToString()).To(Equal(cid[:5])) + Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0)) + }) + It("podman kill a running container by id", func() { session := podmanTest.RunTopContainer("") session.WaitWithDefaultTimeout() |