specific node for events

Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
This commit is contained in:
Xian Chaobo 2015-04-22 15:29:39 +08:00
parent d1bc9e3407
commit d884b46272
1 changed files with 6 additions and 2 deletions

View File

@ -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" {