summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2020-06-23 13:33:42 -0400
committerMatthew Heon <mheon@redhat.com>2020-06-24 14:47:59 -0400
commiteb9fd40d21ba2ce28ef1fdf411d6fb838dee9b4b (patch)
tree00d5a523bb7dce9887657f8eec0cd5d08f88456f /test
parent6594d5d6558437d4cdb11a72eda175ead407ec75 (diff)
downloadpodman-eb9fd40d21ba2ce28ef1fdf411d6fb838dee9b4b.tar.gz
podman-eb9fd40d21ba2ce28ef1fdf411d6fb838dee9b4b.tar.bz2
podman-eb9fd40d21ba2ce28ef1fdf411d6fb838dee9b4b.zip
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>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/create_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go
index 52ce0b46a..44bb5c45f 100644
--- a/test/e2e/create_test.go
+++ b/test/e2e/create_test.go
@@ -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)))
+ })
})