Merge pull request #747 from vieux/fix_flacky_rm_test

fix flacky rm test
This commit is contained in:
Andrea Luzzardi 2015-05-07 17:30:58 -07:00
commit f50dedee66
1 changed files with 6 additions and 10 deletions

View File

@ -11,17 +11,15 @@ function teardown() {
start_docker_with_busybox 2 start_docker_with_busybox 2
swarm_manage swarm_manage
run docker_swarm run -d --name test_container busybox docker_swarm create --name test_container busybox
[ "$status" -eq 0 ]
# make sure container exsists # make sure container exsists
run docker_swarm ps -l run docker_swarm ps -l
[ "${#lines[@]}" -eq 2 ] [ "${#lines[@]}" -eq 2 ]
[[ "${lines[1]}" == *"test_container"* ]] [[ "${lines[1]}" == *"test_container"* ]]
run docker_swarm rm test_container docker_swarm rm test_container
[ "$status" -eq 0 ]
# verify # verify
run docker_swarm ps -aq run docker_swarm ps -aq
[ "${#lines[@]}" -eq 0 ] [ "${#lines[@]}" -eq 0 ]
@ -31,8 +29,7 @@ function teardown() {
start_docker_with_busybox 2 start_docker_with_busybox 2
swarm_manage swarm_manage
run docker_swarm run -d --name test_container busybox sleep 500 docker_swarm run -d --name test_container busybox sleep 500
[ "$status" -eq 0 ]
# make sure container exsists and is up # make sure container exsists and is up
run docker_swarm ps -a run docker_swarm ps -a
@ -45,8 +42,7 @@ function teardown() {
[ "$status" -ne 0 ] [ "$status" -ne 0 ]
# rm -f, remove a running container # rm -f, remove a running container
run docker_swarm rm -f test_container docker_swarm rm -f test_container
[ "$status" -eq 0 ]
# verify # verify
run docker_swarm ps -aq run docker_swarm ps -aq