summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-12-15 13:06:01 +0100
committerValentin Rothberg <rothberg@redhat.com>2021-12-16 13:04:58 +0100
commit3b6510da68c4c72862aaae36b8cc77f4e165a434 (patch)
tree51b2dd61e753b616c57544518ed9ab6b033addc2 /test
parentd984fec351c06a95f8a51c7e6ced819c6b17245f (diff)
downloadpodman-3b6510da68c4c72862aaae36b8cc77f4e165a434.tar.gz
podman-3b6510da68c4c72862aaae36b8cc77f4e165a434.tar.bz2
podman-3b6510da68c4c72862aaae36b8cc77f4e165a434.zip
kill: fix output
Make sure that `kill -a` is printing the IDs of killed containers. Previously, it was only printing empty lines. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/system/130-kill.bats14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/system/130-kill.bats b/test/system/130-kill.bats
index 1ff3a7b61..a9456e03c 100644
--- a/test/system/130-kill.bats
+++ b/test/system/130-kill.bats
@@ -116,4 +116,18 @@ load helpers
is "$output" "Error: valid signals are 1 through 64" "podman create"
}
+@test "podman kill - print IDs or raw input" {
+ # kill -a must print the IDs
+ run_podman run --rm -d $IMAGE top
+ ctrID="$output"
+ run_podman kill -a
+ is "$output" "$ctrID"
+
+ # kill $input must print $input
+ cname=$(random_string)
+ run_podman run --rm -d --name $cname $IMAGE top
+ run_podman kill $cname
+ is "$output" $cname
+}
+
# vim: filetype=sh