summaryrefslogtreecommitdiff
path: root/test/e2e/run_working_dir_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/run_working_dir_test.go')
-rw-r--r--test/e2e/run_working_dir_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/e2e/run_working_dir_test.go b/test/e2e/run_working_dir_test.go
index de0f55134..ac78110bf 100644
--- a/test/e2e/run_working_dir_test.go
+++ b/test/e2e/run_working_dir_test.go
@@ -7,6 +7,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", func() {
@@ -36,14 +37,14 @@ var _ = Describe("Podman run", func() {
It("podman run a container without workdir", func() {
session := podmanTest.Podman([]string{"run", ALPINE, "pwd"})
session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
+ Expect(session).Should(Exit(0))
Expect(session.OutputToString()).To(Equal("/"))
})
It("podman run a container using non existing --workdir", func() {
session := podmanTest.Podman([]string{"run", "--workdir", "/home/foobar", ALPINE, "pwd"})
session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(126))
+ Expect(session).Should(Exit(126))
})
It("podman run a container on an image with a workdir", func() {
@@ -54,7 +55,7 @@ WORKDIR /etc/foobar`, ALPINE)
session := podmanTest.Podman([]string{"run", "test", "pwd"})
session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
+ Expect(session).Should(Exit(0))
Expect(session.OutputToString()).To(Equal("/etc/foobar"))
session = podmanTest.Podman([]string{"run", "test", "ls", "-ld", "."})
@@ -63,7 +64,7 @@ WORKDIR /etc/foobar`, ALPINE)
session = podmanTest.Podman([]string{"run", "--workdir", "/home/foobar", "test", "pwd"})
session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(0))
+ Expect(session).Should(Exit(0))
Expect(session.OutputToString()).To(Equal("/home/foobar"))
})
})