mirror of
https://github.com/containers/podman.git
synced 2026-07-29 08:26:45 -04:00
Remove the use of bash -c unless it involves a bash pipe. Also, use run test_runner.sh inside script so that centos can be happy. Signed-off-by: baude <bbaude@redhat.com> Closes: #239 Approved by: baude
39 lines
963 B
Bash
39 lines
963 B
Bash
#!/usr/bin/env bats
|
|
|
|
load helpers
|
|
|
|
IMAGE="redis:alpine"
|
|
|
|
function teardown() {
|
|
cleanup_test
|
|
}
|
|
|
|
function setup() {
|
|
copy_images
|
|
}
|
|
|
|
@test "mount" {
|
|
run ${PODMAN_BINARY} ${PODMAN_OPTIONS} create $BB ls
|
|
echo "$output"
|
|
[ "$status" -eq 0 ]
|
|
ctr_id="$output"
|
|
run ${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 ${PODMAN_BINARY} ${PODMAN_OPTIONS} unmount $ctr_id
|
|
echo "$output"
|
|
[ "$status" -eq 0 ]
|
|
run ${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 ${PODMAN_BINARY} ${PODMAN_OPTIONS} unmount $ctr_id
|
|
echo "$output"
|
|
[ "$status" -eq 0 ]
|
|
}
|