summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-02-16 07:01:14 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2021-02-16 09:47:38 -0500
commit958f90143199bbc4b5dcd7ad4fffdd56d3f6fbc3 (patch)
tree4eaaf18c511d9e3e05a58ca47039333bd4c86ee3 /test/e2e
parent58a4793bec30058f648dcd1248da333a7bb6d47c (diff)
downloadpodman-958f90143199bbc4b5dcd7ad4fffdd56d3f6fbc3.tar.gz
podman-958f90143199bbc4b5dcd7ad4fffdd56d3f6fbc3.tar.bz2
podman-958f90143199bbc4b5dcd7ad4fffdd56d3f6fbc3.zip
podman kill should report rawInput not container id
Docker always reports back the users input, not the full id, we should do the same. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/kill_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/e2e/kill_test.go b/test/e2e/kill_test.go
index c1c1b003e..6d6fe788b 100644
--- a/test/e2e/kill_test.go
+++ b/test/e2e/kill_test.go
@@ -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()