mirror of
https://github.com/containers/podman.git
synced 2025-10-16 10:43:52 +08:00
quadlet: generate RequiresMountsFor for Type=bind volumes
This makes sure that the volume source is available before the volume is created. Fixes: https://github.com/containers/podman/issues/26125 Signed-off-by: Hiếu Lê <leorize+oss@disroot.org>
This commit is contained in:
9
test/e2e/quadlet/device-bind.volume
Normal file
9
test/e2e/quadlet/device-bind.volume
Normal file
@ -0,0 +1,9 @@
|
||||
## assert-key-contains Service ExecStart " --opt type=bind "
|
||||
## assert-key-contains Service ExecStart " --opt device=/var/lib/data "
|
||||
## assert-key-contains Service ExecStart " --opt nocopy "
|
||||
## assert-key-contains Unit RequiresMountsFor "/var/lib/data"
|
||||
|
||||
[Volume]
|
||||
Device=/var/lib/data
|
||||
Type=bind
|
||||
Copy=no
|
@ -803,7 +803,6 @@ BOGUS=foo
|
||||
dirName := "test_subdir"
|
||||
|
||||
err = CopyDirectory(filepath.Join("quadlet", dirName), quadletDir)
|
||||
|
||||
if err != nil {
|
||||
GinkgoWriter.Println("error:", err)
|
||||
}
|
||||
@ -975,6 +974,7 @@ BOGUS=foo
|
||||
Entry("image.volume", "image.volume"),
|
||||
Entry("Volume - global args", "globalargs.volume"),
|
||||
Entry("Volume - Containers Conf Modules", "containersconfmodule.volume"),
|
||||
Entry("Volume - Type=bind", "device-bind.volume"),
|
||||
|
||||
Entry("Absolute Path", "absolute.path.kube"),
|
||||
Entry("Basic kube", "basic.kube"),
|
||||
@ -1276,5 +1276,4 @@ BOGUS=foo
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
})
|
||||
|
Reference in New Issue
Block a user