diff options
author | Aditya R <arajan@redhat.com> | 2022-04-06 15:59:59 +0530 |
---|---|---|
committer | Aditya R <arajan@redhat.com> | 2022-04-12 12:30:09 +0530 |
commit | 81a95fade593d4fda6c6f340865ae24824ac2ac8 (patch) | |
tree | 10d3ba6bb26048bf270866534892f8c29262608e /test/e2e/run_volume_test.go | |
parent | 8b6f911e4818d02bca65ff263dcb61bfe082a470 (diff) | |
download | podman-81a95fade593d4fda6c6f340865ae24824ac2ac8.tar.gz podman-81a95fade593d4fda6c6f340865ae24824ac2ac8.tar.bz2 podman-81a95fade593d4fda6c6f340865ae24824ac2ac8.zip |
run, mount: allow setting driver specific option using volume-opt
`--mount` should allow setting driver specific options using
`volume-opt` when `type=volume` is set.
This ensures parity with docker's `volume-opt`.
Signed-off-by: Aditya R <arajan@redhat.com>
Diffstat (limited to 'test/e2e/run_volume_test.go')
-rw-r--r-- | test/e2e/run_volume_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go index 471b3a342..4887197f6 100644 --- a/test/e2e/run_volume_test.go +++ b/test/e2e/run_volume_test.go @@ -797,6 +797,19 @@ VOLUME /test/`, ALPINE) Expect(session.OutputToString()).Should(Equal("888:888")) }) + It("podman run with --mount and named volume with driver-opts", func() { + // anonymous volume mount with driver opts + vol := "type=volume,source=test_vol,dst=/test,volume-opt=type=tmpfs,volume-opt=device=tmpfs,volume-opt=o=nodev" + session := podmanTest.Podman([]string{"run", "--rm", "--mount", vol, ALPINE, "echo", "hello"}) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) + + inspectVol := podmanTest.Podman([]string{"volume", "inspect", "test_vol"}) + inspectVol.WaitWithDefaultTimeout() + Expect(inspectVol).Should(Exit(0)) + Expect(inspectVol.OutputToString()).To(ContainSubstring("nodev")) + }) + It("volume permissions after run", func() { imgName := "testimg" dockerfile := fmt.Sprintf(`FROM %s |