summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2017-11-29 20:01:39 -0600
committerAtomic Bot <atomic-devel@projectatomic.io>2017-12-01 13:18:32 +0000
commit1f01faf4375b2dc667b2794e4decdf360d6e32b8 (patch)
tree6736a22e1387b8443204327a4275efe4c8817e53 /test
parent82018a4a9f5bcbda82c88b1f387be2953bc7a68a (diff)
downloadpodman-1f01faf4375b2dc667b2794e4decdf360d6e32b8.tar.gz
podman-1f01faf4375b2dc667b2794e4decdf360d6e32b8.tar.bz2
podman-1f01faf4375b2dc667b2794e4decdf360d6e32b8.zip
kpod stop -a
Stop all running containers with single switch. Useful for maintainence of a system or integration tests. Signed-off-by: baude <bbaude@redhat.com> Closes: #90 Approved by: rhatdan
Diffstat (limited to 'test')
-rw-r--r--test/kpod_stop.bats9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/kpod_stop.bats b/test/kpod_stop.bats
index 0c1bd329c..3804147fd 100644
--- a/test/kpod_stop.bats
+++ b/test/kpod_stop.bats
@@ -38,3 +38,12 @@ function setup() {
run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps"
[ "$status" -eq 0 ]
}
+
+@test "stop all containers" {
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --name test1 -d ${ALPINE} sleep 9999"
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --name test2 -d ${ALPINE} sleep 9999"
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --name test3 -d ${ALPINE} sleep 9999"
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} stop -a -t 1"
+ echo "$output"
+ [ "$status" -eq 0 ]
+}