summaryrefslogtreecommitdiff
path: root/test/e2e/run_cleanup_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/run_cleanup_test.go')
-rw-r--r--test/e2e/run_cleanup_test.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/test/e2e/run_cleanup_test.go b/test/e2e/run_cleanup_test.go
index 2dfaf1329..cfe11079d 100644
--- a/test/e2e/run_cleanup_test.go
+++ b/test/e2e/run_cleanup_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 exit", func() {
@@ -39,33 +40,33 @@ var _ = Describe("Podman run exit", func() {
result := podmanTest.Podman([]string{"run", "-dt", ALPINE, "top"})
result.WaitWithDefaultTimeout()
cid := result.OutputToString()
- Expect(result.ExitCode()).To(Equal(0))
+ Expect(result).Should(Exit(0))
mount := SystemExec("mount", nil)
- Expect(mount.ExitCode()).To(Equal(0))
+ Expect(mount).Should(Exit(0))
Expect(mount.OutputToString()).To(ContainSubstring(cid))
pmount := podmanTest.Podman([]string{"mount", "--notruncate"})
pmount.WaitWithDefaultTimeout()
- Expect(pmount.ExitCode()).To(Equal(0))
+ Expect(pmount).Should(Exit(0))
Expect(pmount.OutputToString()).To(ContainSubstring(cid))
stop := podmanTest.Podman([]string{"stop", cid})
stop.WaitWithDefaultTimeout()
- Expect(stop.ExitCode()).To(Equal(0))
+ Expect(stop).Should(Exit(0))
// We have to force cleanup so the unmount happens
podmanCleanupSession := podmanTest.Podman([]string{"container", "cleanup", cid})
podmanCleanupSession.WaitWithDefaultTimeout()
- Expect(podmanCleanupSession.ExitCode()).To(Equal(0))
+ Expect(podmanCleanupSession).Should(Exit(0))
mount = SystemExec("mount", nil)
- Expect(mount.ExitCode()).To(Equal(0))
+ Expect(mount).Should(Exit(0))
Expect(mount.OutputToString()).NotTo(ContainSubstring(cid))
pmount = podmanTest.Podman([]string{"mount", "--notruncate"})
pmount.WaitWithDefaultTimeout()
- Expect(pmount.ExitCode()).To(Equal(0))
+ Expect(pmount).Should(Exit(0))
Expect(pmount.OutputToString()).NotTo(ContainSubstring(cid))
})