summaryrefslogtreecommitdiff
path: root/test/e2e/restart_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/restart_test.go')
-rw-r--r--test/e2e/restart_test.go26
1 files changed, 24 insertions, 2 deletions
diff --git a/test/e2e/restart_test.go b/test/e2e/restart_test.go
index 584ccd22b..bfe9563ea 100644
--- a/test/e2e/restart_test.go
+++ b/test/e2e/restart_test.go
@@ -197,10 +197,10 @@ var _ = Describe("Podman restart", func() {
Expect(restartTime.OutputToStringArray()[1]).To(Not(Equal(startTime.OutputToStringArray()[1])))
})
- It("Podman restart a container in a pod and hosts shouln't duplicated", func() {
+ It("Podman restart a container in a pod and hosts should not duplicated", func() {
// Fixes: https://github.com/containers/podman/issues/8921
- _, ec, _ := podmanTest.CreatePod("foobar99")
+ _, ec, _ := podmanTest.CreatePod(map[string][]string{"--name": {"foobar99"}})
Expect(ec).To(Equal(0))
session := podmanTest.RunTopContainerInPod("host-restart-test", "foobar99")
@@ -225,4 +225,26 @@ var _ = Describe("Podman restart", func() {
// line count should be equal
Expect(beforeRestart.OutputToString()).To(Equal(afterRestart.OutputToString()))
})
+
+ It("podman restart --all", func() {
+ session := podmanTest.RunTopContainer("")
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1))
+
+ session = podmanTest.RunTopContainer("")
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(podmanTest.NumberOfContainersRunning()).To(Equal(2))
+
+ session = podmanTest.Podman([]string{"stop", "--all"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"restart", "--all"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(podmanTest.NumberOfContainersRunning()).To(Equal(2))
+ })
})