mirror of
https://github.com/containers/podman.git
synced 2025-12-15 11:42:28 +08:00
Allow creating anonymous volumes with --mount
This fixes #13756. All the mechanics to create anonymous volumes is already present, but there's still a validation preventing that path from being taken. We remove the validation, which allows the volume to be created successfully. Signed-off-by: Andrew Aylett <andrew@aylett.co.uk>
This commit is contained in:
@@ -778,6 +778,13 @@ VOLUME /test/`, ALPINE)
|
||||
Expect(session).Should(Exit(0))
|
||||
Expect(session.OutputToString()).Should(Equal("888:888"))
|
||||
|
||||
// anonymous volume mount
|
||||
vol = "type=volume," + "dst=" + dest
|
||||
session = podmanTest.Podman([]string{"run", "--rm", "--user", "888:888", "--mount", vol, ALPINE, "stat", "-c", "%u:%g", dest})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
Expect(session.OutputToString()).Should(Equal("888:888"))
|
||||
|
||||
// named volume mount
|
||||
namedVolume := podmanTest.Podman([]string{"volume", "create", "foo"})
|
||||
namedVolume.WaitWithDefaultTimeout()
|
||||
|
||||
Reference in New Issue
Block a user