mirror of
https://github.com/containers/podman.git
synced 2026-03-18 06:38:49 -04:00
This option causes Podman to not only remove the specified containers but all of the containers that depend on the specified containers. Fixes: https://github.com/containers/podman/issues/10360 Also ran codespell on the code Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
25 lines
749 B
Bash
25 lines
749 B
Bash
# -*- sh -*-
|
|
#
|
|
# test 'stop' endpoints
|
|
#
|
|
|
|
podman pull $IMAGE &>/dev/null
|
|
|
|
# stop, by name
|
|
podman run -dt --name mytop $IMAGE top &>/dev/null
|
|
|
|
t GET libpod/containers/mytop/json 200 .State.Status=running
|
|
t POST libpod/containers/mytop/stop 204
|
|
t GET libpod/containers/mytop/json 200 .State.Status~\\\(exited\\\|stopped\\\)
|
|
t DELETE libpod/containers/mytop 200
|
|
|
|
# stop, by ID
|
|
# Remember that podman() hides all output; we need to get our CID via inspect
|
|
podman run -dt --name mytop $IMAGE top
|
|
|
|
t GET libpod/containers/mytop/json 200 .State.Status=running
|
|
cid=$(jq -r .Id <<<"$output")
|
|
t POST libpod/containers/$cid/stop 204
|
|
t GET libpod/containers/mytop/json 200 .State.Status~\\\(exited\\\|stopped\\\)
|
|
t DELETE libpod/containers/mytop 200
|