File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1403,6 +1403,30 @@ search | $IMAGE |
14031403 run_podman rm -f -t0 $cid
14041404}
14051405
1406+ @test " podman run with mounts.conf missing" {
1407+ skip_if_remote " --default-mounts-file is not supported for remote clients"
1408+ MOUNTS_CONF=$PODMAN_TMPDIR /mounts.conf
1409+ run_podman run --rm --default-mounts-file=${MOUNTS_CONF} $IMAGE echo test1
1410+ assert " $output " = " test1" " No warning messages on missing mounts file"
1411+
1412+ touch ${MOUNTS_CONF}
1413+
1414+ run_podman run --rm --default-mounts-file=${MOUNTS_CONF} $IMAGE echo test2
1415+ assert " $output " = " test2" " No warning messages on empty mounts file"
1416+
1417+ echo /tmp/bogus > ${MOUNTS_CONF}
1418+ run_podman run --rm --default-mounts-file=${MOUNTS_CONF} $IMAGE echo test3
1419+ assert " $output " = " test3" " No warning messages on missing content in mounts file"
1420+
1421+ randfile=$( random_string 30)
1422+ randcontent=$( random_string 30)
1423+ mkdir -p $PODMAN_TMPDIR /mounts
1424+ echo $randcontent > $PODMAN_TMPDIR /mounts/$randfile
1425+ echo $PODMAN_TMPDIR /mounts:/run/secrets > ${MOUNTS_CONF}
1426+ run_podman run --rm --default-mounts-file=${MOUNTS_CONF} $IMAGE cat /run/secrets/$randfile
1427+ assert " $output " = " $randcontent " " mounts should appear in container"
1428+ }
1429+
14061430@test " podman run - rm pod if container creation failed with -pod new:" {
14071431 run_podman run -d --name foobar $IMAGE hostname
14081432 cid=$output
You can’t perform that action at this time.
0 commit comments