summaryrefslogtreecommitdiff
path: root/test/e2e/run_restart_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/run_restart_test.go')
-rw-r--r--test/e2e/run_restart_test.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/e2e/run_restart_test.go b/test/e2e/run_restart_test.go
index c996bdb25..35768ca51 100644
--- a/test/e2e/run_restart_test.go
+++ b/test/e2e/run_restart_test.go
@@ -6,6 +6,7 @@ import (
. "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
+ . "github.com/onsi/gomega/gexec"
)
var _ = Describe("Podman run restart containers", func() {
@@ -35,15 +36,15 @@ var _ = Describe("Podman run restart containers", func() {
It("Podman start after successful run", func() {
session := podmanTest.Podman([]string{"run", "--name", "test", ALPINE, "ls"})
session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
+ Expect(session).Should(Exit(0))
session = podmanTest.Podman([]string{"wait", "test"})
session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
+ Expect(session).Should(Exit(0))
session2 := podmanTest.Podman([]string{"start", "--attach", "test"})
session2.WaitWithDefaultTimeout()
- Expect(session2.ExitCode()).To(Equal(0))
+ Expect(session2).Should(Exit(0))
})
It("Podman start after signal kill", func() {
@@ -53,10 +54,10 @@ var _ = Describe("Podman run restart containers", func() {
killSession := podmanTest.Podman([]string{"kill", "-s", "9", "test1"})
killSession.WaitWithDefaultTimeout()
- Expect(killSession.ExitCode()).To(Equal(0))
+ Expect(killSession).Should(Exit(0))
session2 := podmanTest.Podman([]string{"start", "test1"})
session2.WaitWithDefaultTimeout()
- Expect(session2.ExitCode()).To(Equal(0))
+ Expect(session2).Should(Exit(0))
})
})