diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-25 16:06:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-25 16:06:07 +0000 |
commit | b9d77796c0e011e6337f5c173bb633ebcae863f9 (patch) | |
tree | 4080d9269f8ca07b3e079e64dfc1f1fdb3b1e22b /test/system/060-mount.bats | |
parent | 2583246a17e40af3a3227f24daeb7b081f1c3d55 (diff) | |
parent | bd3c66fc8151350ad6562959054eddb5508cf028 (diff) | |
download | podman-b9d77796c0e011e6337f5c173bb633ebcae863f9.tar.gz podman-b9d77796c0e011e6337f5c173bb633ebcae863f9.tar.bz2 podman-b9d77796c0e011e6337f5c173bb633ebcae863f9.zip |
Merge pull request #7687 from edsantiago/bats
system tests: new tests
Diffstat (limited to 'test/system/060-mount.bats')
-rw-r--r-- | test/system/060-mount.bats | 30 |
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 |