mirror of
https://github.com/containers/podman.git
synced 2025-06-19 16:33:24 +08:00
Test to make sure we are getting proper exit codes on podman run
podman run command screws up we should get 125 podman run command succeeds but command in container fails to exec 126 podman run command succeeds but command exits with non 0 exit code Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #921 Approved by: TomSweeneyRedHat
This commit is contained in:

committed by
Atomic Bot

parent
d7f9781bd6
commit
1cbce851fa
@ -465,4 +465,15 @@ var _ = Describe("Podman run", func() {
|
||||
Expect(session.ExitCode()).To(Equal(125))
|
||||
})
|
||||
|
||||
It("podman run exit code on failure to exec", func() {
|
||||
session := podmanTest.Podman([]string{"run", ALPINE, "/etc"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(126))
|
||||
})
|
||||
|
||||
It("podman run error on exec", func() {
|
||||
session := podmanTest.Podman([]string{"run", ALPINE, "sh", "-c", "exit 100"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(100))
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user