1
0
mirror of https://github.com/docker/docs.git synced 2026-10-31 10:34:26 +03:00

volume rm integration test needs wait to avoid race

- additional comments in test

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
This commit is contained in:
Morgan Bauer
2016-04-13 10:24:47 +01:00
parent 2bbea5d1a4
commit d2e375e31d

View File

@@ -73,20 +73,25 @@ function teardown() {
start_docker_with_busybox 2
swarm_manage
# check for failure when removing a nonexistant volume
run docker_swarm volume rm test_volume
[ "$status" -ne 0 ]
# run a container that exits imediately but stays around and
# connected to the volume. Wait for it to finish.
docker_swarm run -d --name=test_container -v=/tmp busybox true
docker_swarm wait test_container
run docker_swarm volume ls -q
volume=${output}
[ "${#lines[@]}" -eq 1 ]
# check that removing an attached volume is an error
run docker_swarm volume rm $volume
[ "$status" -ne 0 ]
docker_swarm rm test_container
run docker_swarm volume rm $volume
[ "$status" -eq 0 ]
[ "${#lines[@]}" -eq 1 ]