summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-16 08:27:28 -0500
committerGitHub <noreply@github.com>2021-02-16 08:27:28 -0500
commit7b17c77adc63c3dc062208189942543027f1495d (patch)
treebc25853d7ccefeb166aadafcb45c85f793c15b3d /test/e2e
parent8c444e6f0b3663a657c946e1c731f390553f065d (diff)
parent3d50393f09c8ace639bb4e8f8cae94d89ce1b91a (diff)
downloadpodman-7b17c77adc63c3dc062208189942543027f1495d.tar.gz
podman-7b17c77adc63c3dc062208189942543027f1495d.tar.bz2
podman-7b17c77adc63c3dc062208189942543027f1495d.zip
Merge pull request #9391 from rhatdan/workdir
Don't chown workdir if it already exists
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/run_working_dir_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/e2e/run_working_dir_test.go b/test/e2e/run_working_dir_test.go
index 59538448e..948ed05e7 100644
--- a/test/e2e/run_working_dir_test.go
+++ b/test/e2e/run_working_dir_test.go
@@ -47,7 +47,7 @@ var _ = Describe("Podman run", func() {
It("podman run a container on an image with a workdir", func() {
dockerfile := `FROM alpine
-RUN mkdir -p /home/foobar
+RUN mkdir -p /home/foobar /etc/foobar; chown bin:bin /etc/foobar
WORKDIR /etc/foobar`
podmanTest.BuildImage(dockerfile, "test", "false")
@@ -56,6 +56,10 @@ WORKDIR /etc/foobar`
Expect(session.ExitCode()).To(Equal(0))
Expect(session.OutputToString()).To(Equal("/etc/foobar"))
+ session = podmanTest.Podman([]string{"run", "test", "ls", "-ld", "."})
+ session.WaitWithDefaultTimeout()
+ Expect(session.LineInOutputContains("bin")).To(BeTrue())
+
session = podmanTest.Podman([]string{"run", "--workdir", "/home/foobar", "test", "pwd"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))