summaryrefslogtreecommitdiff
path: root/test/system/060-mount.bats
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2020-09-16 10:06:33 -0600
committerEd Santiago <santiago@redhat.com>2020-09-19 15:55:00 -0600
commitbd3c66fc8151350ad6562959054eddb5508cf028 (patch)
tree487c34a3af99796784538929d8cc61a536a07622 /test/system/060-mount.bats
parent852943516606f32ccc2406f41bcf3df42d7c622c (diff)
downloadpodman-bd3c66fc8151350ad6562959054eddb5508cf028.tar.gz
podman-bd3c66fc8151350ad6562959054eddb5508cf028.tar.bz2
podman-bd3c66fc8151350ad6562959054eddb5508cf028.zip
system tests: new tests
- podman network create: new test - podman pull by-sha + podman images -a (#7651) - podman image mount: new test - podman pod: --infra-image and --infra-command (#7167) For convenience and robustness, build a new testimage containing a custom file /home/podman/testimage-id with contents YYYYMMDD (same as image tag). The image-mount test checks that this file exists and has the desired content. New testimage also includes a dummy 'pause' executable, for testing pod infra. Updates from testimage:20200902 to :20200917 Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/system/060-mount.bats')
-rw-r--r--test/system/060-mount.bats30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/system/060-mount.bats b/test/system/060-mount.bats
index d98a3eeb1..75c88e4ad 100644
--- a/test/system/060-mount.bats
+++ b/test/system/060-mount.bats
@@ -35,4 +35,34 @@ load helpers
fi
}
+
+@test "podman image mount" {
+ skip_if_remote "mounting remote is meaningless"
+ skip_if_rootless "too hard to test rootless"
+
+ # Start with clean slate
+ run_podman image umount -a
+
+ run_podman image mount $IMAGE
+ mount_path="$output"
+
+ test -d $mount_path
+
+ # Image is custom-built and has a file containing the YMD tag. Check it.
+ testimage_file="/home/podman/testimage-id"
+ test -e "$mount_path$testimage_file"
+ is $(< "$mount_path$testimage_file") "$PODMAN_TEST_IMAGE_TAG" \
+ "Contents of $testimage_file in image"
+
+ # 'image mount', no args, tells us what's mounted
+ run_podman image mount
+ is "$output" "$IMAGE $mount_path" "podman image mount with no args"
+
+ # Clean up
+ run_podman image umount $IMAGE
+
+ run_podman image mount
+ is "$output" "" "podman image mount, no args, after umount"
+}
+
# vim: filetype=sh