mirror of
https://github.com/containers/podman.git
synced 2025-11-30 10:07:33 +08:00
fix: mounting issue with single character volume on windows
fixes https://github.com/containers/podman/issues/25218 Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
This commit is contained in:
@@ -145,6 +145,19 @@ var _ = Describe("Podman run with volumes", func() {
|
||||
Expect(session).To(ExitWithError(125, fmt.Sprintf("%s: duplicate mount destination", dest)))
|
||||
})
|
||||
|
||||
It("podman run with single character volume", func() {
|
||||
// 1. create single character volume
|
||||
session := podmanTest.Podman([]string{"volume", "create", "a"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
volName := session.OutputToString()
|
||||
Expect(session).Should(ExitCleanly())
|
||||
|
||||
// 2. create container with volume
|
||||
session = podmanTest.Podman([]string{"run", "--volume", volName + ":/data", ALPINE, "sh", "-c", "echo hello world"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(ExitCleanly())
|
||||
})
|
||||
|
||||
It("podman run with conflict between image volume and user mount succeeds", func() {
|
||||
err = podmanTest.RestoreArtifact(REDIS_IMAGE)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
Reference in New Issue
Block a user