From a0973e6f917a43fff44f7cf5b611ce8fa1a0e95e Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Fri, 8 May 2015 19:52:49 -0700 Subject: [PATCH] integration: Fix pause test and make sure the cleanup is done properly. Signed-off-by: Andrea Luzzardi --- test/integration/api/pause.bats | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/integration/api/pause.bats b/test/integration/api/pause.bats index d17a70c4b1..a1297be50a 100644 --- a/test/integration/api/pause.bats +++ b/test/integration/api/pause.bats @@ -3,6 +3,8 @@ load ../helpers function teardown() { + # if the state of the container is paused, it can't be removed(rm -f) + run docker_swarm unpause test_container swarm_manage_cleanup stop_docker } @@ -22,9 +24,6 @@ function teardown() { # verify # FIXME(#748): Retry required because of race condition. - retry 5 0.5 eval "[ $(docker_swarm inspect -f '{{ .State.Paused }}' test_container) == 'true ']" + retry 5 0.5 eval "[ $(docker_swarm inspect -f '{{ .State.Paused }}' test_container) == 'true']" [ docker_swarm inspect -f '{{ .State.Running }}' test_container == 'false' ] - - # if the state of the container is paused, it can't be removed(rm -f) - docker_swarm unpause test_container }