summaryrefslogtreecommitdiff
path: root/test/e2e/stop_test.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-09-29 10:03:46 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2021-10-08 07:06:37 -0400
commit48d26a893e0adcf5f9b339a675bfffe688a9ea22 (patch)
tree6b889b7972e9ed0a1390bc256e98b2a7d1e2d87d /test/e2e/stop_test.go
parent14c0fcc6b7b3e8c1f28efea329ab9a6bf0d99b70 (diff)
downloadpodman-48d26a893e0adcf5f9b339a675bfffe688a9ea22.tar.gz
podman-48d26a893e0adcf5f9b339a675bfffe688a9ea22.tar.bz2
podman-48d26a893e0adcf5f9b339a675bfffe688a9ea22.zip
Warn if podman stop timeout expires that sigkill was sent
Note: the Warning message will not come to podman-remote. It would be difficult to plumb, and not really worth the effort. Fixes: https://github.com/containers/podman/issues/11854 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/e2e/stop_test.go')
-rw-r--r--test/e2e/stop_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/e2e/stop_test.go b/test/e2e/stop_test.go
index 7f178d719..fb8f92e0f 100644
--- a/test/e2e/stop_test.go
+++ b/test/e2e/stop_test.go
@@ -181,6 +181,18 @@ var _ = Describe("Podman stop", func() {
Expect(strings.TrimSpace(finalCtrs.OutputToString())).To(Equal(""))
})
+ It("podman stop container --timeout Warning", func() {
+ SkipIfRemote("warning will happen only on server side")
+ session := podmanTest.Podman([]string{"run", "-d", "--name", "test5", ALPINE, "sleep", "100"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ session = podmanTest.Podman([]string{"stop", "--timeout", "1", "test5"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ warning := session.ErrorToString()
+ Expect(warning).To(ContainSubstring("StopSignal SIGTERM failed to stop container test5 in 1 seconds, resorting to SIGKILL"))
+ })
+
It("podman stop latest containers", func() {
SkipIfRemote("--latest flag n/a")
session := podmanTest.RunTopContainer("test1")