mirror of
https://github.com/containers/podman.git
synced 2025-06-26 04:46:57 +08:00
Set stop signal to 15 when not explicitly set
When going through the output of `podman inspect` to try and identify another issue, I noticed that Podman 2.0 was setting StopSignal to 0 on containers by default. After chasing it through the command line and SpecGen, I determined that we were actually not setting a default in Libpod, which is strange because I swear we used to do that. I re-added the disappeared default and now all is well again. Also, while I was looking for the bug in SpecGen, I found a bunch of TODOs that have already been done. Eliminate the comments for these. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
@ -458,4 +458,17 @@ var _ = Describe("Podman create", func() {
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
}
|
||||
})
|
||||
|
||||
It("podman create sets default stop signal 15", func() {
|
||||
ctrName := "testCtr"
|
||||
session := podmanTest.Podman([]string{"create", "--name", ctrName, ALPINE, "/bin/sh"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
inspect := podmanTest.Podman([]string{"inspect", ctrName})
|
||||
inspect.WaitWithDefaultTimeout()
|
||||
data := inspect.InspectContainerToJSON()
|
||||
Expect(len(data)).To(Equal(1))
|
||||
Expect(data[0].Config.StopSignal).To(Equal(uint(15)))
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user