mirror of
https://github.com/containers/podman.git
synced 2025-06-30 15:49:03 +08:00
Fix readonly=false failure
There was a huge cut and paste of mount options which were not constent in parsing tmpfs, bind and volume mounts. Consolidated into a single function to guarantee all parse the same. Fixes: https://github.com/containers/podman/issues/18995 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -84,6 +84,22 @@ load helpers
|
||||
is "$output" "" "podman image mount, no args, after umount"
|
||||
}
|
||||
|
||||
@test "podman run --mount ro=false " {
|
||||
local volpath=/path/in/container
|
||||
local stdopts="type=volume,destination=$volpath"
|
||||
|
||||
# Variations on a theme (not by Paganini). All of these should fail.
|
||||
for varopt in readonly readonly=true ro=true ro rw=false;do
|
||||
run_podman 1 run --rm -q --mount $stdopts,$varopt $IMAGE touch $volpath/a
|
||||
is "$output" "touch: $volpath/a: Read-only file system" "with $varopt"
|
||||
done
|
||||
|
||||
# All of these should pass
|
||||
for varopt in rw rw=true ro=false readonly=false;do
|
||||
run_podman run --rm -q --mount $stdopts,$varopt $IMAGE touch $volpath/a
|
||||
done
|
||||
}
|
||||
|
||||
@test "podman run --mount image" {
|
||||
skip_if_rootless "too hard to test rootless"
|
||||
|
||||
|
Reference in New Issue
Block a user