Skip to content

Commit

Permalink
test/system: fix broken "podman volume globs" test
Browse files Browse the repository at this point in the history
This never tested what it said it did, the command line was wrong so
`,ro=false` was taken as image causing a error. What this actually
should care about is that a glob is taken as is and not evaluated.

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed May 8, 2024
1 parent d4c7ca3 commit 521bbab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/system/060-mount.bats
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,11 @@ EOF
is "$output" ".*$vol1a" "podman images --inspect should include $vol1a"
is "$output" ".*$vol1b" "podman images --inspect should include $vol1b"

run_podman 125 run --rm --mount source=${PODMAN_TMPDIR}/v2\*,type=bind,ro=false $IMAGE touch $vol2
run_podman 125 run --rm --mount type=bind,source=${PODMAN_TMPDIR}/v2\*,ro=false $IMAGE touch $vol2
is "$output" "Error: must set volume destination" "Bind mounts require destination"

run_podman 125 run --rm --mount source=${PODMAN_TMPDIR}/v2\*,destination=/tmp/foobar, ro=false $IMAGE touch $vol2
is "$output" "Error: invalid reference format" "Default mounts don not support globs"
run_podman 125 run --rm --mount type=bind,source=${PODMAN_TMPDIR}/v2\*,destination=/tmp/foobar,ro=false $IMAGE touch $vol2
is "$output" "Error: statfs ${PODMAN_TMPDIR}/v2*: no such file or directory" "Bind mount should not interpret glob and must use as is"

mkdir $PODMAN_TMPDIR/foo1 $PODMAN_TMPDIR/foo2 $PODMAN_TMPDIR/foo3
touch $PODMAN_TMPDIR/foo1/bar $PODMAN_TMPDIR/foo2/bar $PODMAN_TMPDIR/foo3/bar
Expand Down

0 comments on commit 521bbab

Please sign in to comment.