summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-06-02 05:28:26 -0400
committerMatthew Heon <mheon@redhat.com>2021-06-24 14:05:12 -0400
commitb0dc157af9f50f1d9b6d89750e73d496bc6ca730 (patch)
tree9c35d4721ddb12405acda22c76a20fe15f3231c1 /test
parentf5cdb95eec4211a963e49c95bc5b3a5d9ac994da (diff)
downloadpodman-b0dc157af9f50f1d9b6d89750e73d496bc6ca730.tar.gz
podman-b0dc157af9f50f1d9b6d89750e73d496bc6ca730.tar.bz2
podman-b0dc157af9f50f1d9b6d89750e73d496bc6ca730.zip
Fix permissions on initially created named volumes
Permission of volume should match the directory it is being mounted on. Fixes: https://github.com/containers/podman/issues/10188 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index f27ded5d2..174714cac 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -904,6 +904,18 @@ USER bin`, BB)
Expect(session.ExitCode()).To(Equal(100))
})
+ It("podman run with named volume", func() {
+ session := podmanTest.Podman([]string{"run", "--rm", ALPINE, "stat", "-c", "%a %Y", "/var/tmp"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ perms := session.OutputToString()
+
+ session = podmanTest.Podman([]string{"run", "--rm", "-v", "test:/var/tmp", ALPINE, "stat", "-c", "%a %Y", "/var/tmp"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(Equal(perms))
+ })
+
It("podman run with built-in volume image", func() {
session := podmanTest.Podman([]string{"run", "--rm", redis, "ls"})
session.WaitWithDefaultTimeout()