diff --git a/test/integration/api.bats b/test/integration/api.bats index 02f6319100..618432dc48 100644 --- a/test/integration/api.bats +++ b/test/integration/api.bats @@ -190,8 +190,8 @@ function teardown() { # start events, report real time events to TEMP_FILE docker_swarm events > $TEMP_FILE & - # events: create container - run docker_swarm create --name test_container busybox sleep 100 + # events: create container on node-0 + run docker_swarm create --name test_container -e constraint:node==node-0 busybox sleep 100 [ "$status" -eq 0 ] # events: start container run docker_swarm start test_container @@ -203,8 +203,12 @@ function teardown() { # verify run cat $TEMP_FILE [ "$status" -eq 0 ] + [[ "${output}" == *"node:node-0"* ]] [[ "${output}" == *"create"* ]] [[ "${output}" == *"start"* ]] + + # after ok, remove the $TEMP_FILE + rm -f $TEMP_FILE } @test "docker exec" {