diff options
Diffstat (limited to 'test/podman_pause.bats')
-rw-r--r-- | test/podman_pause.bats | 112 |
1 files changed, 0 insertions, 112 deletions
diff --git a/test/podman_pause.bats b/test/podman_pause.bats deleted file mode 100644 index 4e98eb130..000000000 --- a/test/podman_pause.bats +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function setup() { - copy_images -} - -function teardown() { - cleanup_test -} - -@test "pause a bogus container" { - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} pause foobar - echo "$output" - [ "$status" -eq 125 ] -} - -@test "unpause a bogus container" { - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} unpause foobar - echo "$output" - [ "$status" -eq 125 ] -} - -@test "pause a created container by id" { - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB sleep 60 - echo "$output" - [ "$status" -eq 0 ] - ctr_id=`echo "$output" | tail -n 1` - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} pause $ctr_id - echo "$output" - [ "$status" -eq 0 ] - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} unpause $ctr_id - echo "$output" - [ "$status" -eq 0 ] - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} rm -f $ctr_id - echo "$output" - [ "$status" -eq 0 ] -} - -@test "pause a running container by id" { - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB sleep 60 - echo "$output" - [ "$status" -eq 0 ] - ctr_id=`echo "$output" | tail -n 1` - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} pause $ctr_id - echo "$output" - [ "$status" -eq 0 ] - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} unpause $ctr_id - echo "$output" - [ "$status" -eq 0 ] - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} rm -f $ctr_id - echo "$output" - [ "$status" -eq 0 ] -} - -@test "unpause a running container" { - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB sleep 60 - echo "$output" - [ "$status" -eq 0 ] - ctr_id=`echo "$output" | tail -n 1` - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} unpause $ctr_id - echo "$output" - [ "$status" -eq 125 ] - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} rm -f $ctr_id - echo "$output" - [ "$status" -eq 0 ] -} - -@test "remove a paused container by id" { - skip "Test needs to wait for --force to work for podman rm" - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB sleep 60 - echo "$output" - [ "$status" -eq 0 ] - ctr_id=`echo "$output" | tail -n 1` - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} pause $ctr_id - echo "$output" - [ "$status" -eq 0 ] - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} rm $ctr_id - echo "$output" - [ "$status" -eq 125 ] - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} rm --force $ctr_id - echo "$output" - [ "$status" -eq 0 ] -} - -@test "stop a paused container created by id" { - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB sleep 60 - echo "$output" - [ "$status" -eq 0 ] - ctr_id=`echo "$output" | tail -n 1` - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} pause $ctr_id - echo "$output" - [ "$status" -eq 0 ] - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} stop $ctr_id - echo "$output" - [ "$status" -eq 125 ] - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} unpause $ctr_id - echo "$output" - [ "$status" -eq 0 ] - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} ps -a --filter id=$ctr_id - echo "$output" - [ "$status" -eq 0 ] - # Container should be running after unpause and shouldn't - # be removable without the force flag. - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} rm $ctr_id - echo "$output" - [ "$status" -eq 125 ] - run ${PODMAN_BINARY} ${PODMAN_OPTIONS} rm -f $ctr_id - echo "$output" - [ "$status" -eq 0 ] -} |