summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-01-08 14:40:29 -0600
committerAtomic Bot <atomic-devel@projectatomic.io>2018-01-08 22:44:38 +0000
commit245a338f5a6519f5729749be646abbefd12701d8 (patch)
treef40a53649ffd2e67beae4036c029a46b0f1d5c66 /test
parentda7556de4ad1d89bd97e1f6c5a146eee00e8c040 (diff)
downloadpodman-245a338f5a6519f5729749be646abbefd12701d8.tar.gz
podman-245a338f5a6519f5729749be646abbefd12701d8.tar.bz2
podman-245a338f5a6519f5729749be646abbefd12701d8.zip
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 <bbaude@redhat.com> Closes: #201 Approved by: baude
Diffstat (limited to 'test')
-rw-r--r--test/podman_wait.bats7
1 files changed, 7 insertions, 0 deletions
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 ]
+}