From 1f01faf4375b2dc667b2794e4decdf360d6e32b8 Mon Sep 17 00:00:00 2001 From: baude Date: Wed, 29 Nov 2017 20:01:39 -0600 Subject: kpod stop -a Stop all running containers with single switch. Useful for maintainence of a system or integration tests. Signed-off-by: baude Closes: #90 Approved by: rhatdan --- test/kpod_stop.bats | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/kpod_stop.bats') 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 ] +} -- cgit v1.2.3-54-g00ecf