summaryrefslogtreecommitdiff
path: root/test/podman_mount.bats
diff options
context:
space:
mode:
Diffstat (limited to 'test/podman_mount.bats')
-rw-r--r--test/podman_mount.bats39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/podman_mount.bats b/test/podman_mount.bats
new file mode 100644
index 000000000..110cf0e93
--- /dev/null
+++ b/test/podman_mount.bats
@@ -0,0 +1,39 @@
+#!/usr/bin/env bats
+
+load helpers
+
+IMAGE="redis:alpine"
+
+function teardown() {
+ cleanup_test
+}
+
+function setup() {
+ prepare_network_conf
+ copy_images
+}
+
+@test "mount" {
+ run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} create $BB ls"
+ echo "$output"
+ [ "$status" -eq 0 ]
+ ctr_id="$output"
+ run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} mount $ctr_id"
+ echo "$output"
+ [ "$status" -eq 0 ]
+ run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} mount --notruncate | grep $ctr_id"
+ echo "$output"
+ [ "$status" -eq 0 ]
+ run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} unmount $ctr_id"
+ echo "$output"
+ [ "$status" -eq 0 ]
+ run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} mount $ctr_id"
+ echo "$output"
+ [ "$status" -eq 0 ]
+ run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} mount --format=json | python -m json.tool | grep $ctr_id"
+ echo "$output"
+ [ "$status" -eq 0 ]
+ run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} unmount $ctr_id"
+ echo "$output"
+ [ "$status" -eq 0 ]
+}