mirror of https://github.com/docker/docs.git
specific node for events
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
This commit is contained in:
parent
d1bc9e3407
commit
d884b46272
|
@ -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" {
|
||||
|
|
Loading…
Reference in New Issue