From 245a338f5a6519f5729749be646abbefd12701d8 Mon Sep 17 00:00:00 2001 From: baude Date: Mon, 8 Jan 2018 14:40:29 -0600 Subject: Add latest to wait It is desirable to have a --latest switch on the podman wait command so we can wait on the latest container created to end. Also, fixes a panic with latest where no containers are available. Signed-off-by: baude Closes: #201 Approved by: baude --- test/podman_wait.bats | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/podman_wait.bats b/test/podman_wait.bats index 3109ce91e..9d6c22734 100644 --- a/test/podman_wait.bats +++ b/test/podman_wait.bats @@ -34,3 +34,10 @@ function teardown() { run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} wait $ctr_id [ "$status" -eq 0 ] } + +@test "wait on the latest container" { + ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} sleep 5 + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} wait -l + echo "$output" + [ "$status" -eq 0 ] +} -- cgit v1.2.3-54-g00ecf