mirror of https://github.com/docker/docs.git
update load-image integration test
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
This commit is contained in:
parent
f7d9a96785
commit
820804b108
|
@ -5,26 +5,26 @@ load helpers
|
|||
IMAGE_FILE=$(mktemp)
|
||||
|
||||
function teardown() {
|
||||
stop_manager
|
||||
stop_docker
|
||||
rm -f $IMAGE_FILE
|
||||
stop_docker
|
||||
swarm_manage_cleanup
|
||||
rm -f $IMAGE_FILE
|
||||
}
|
||||
|
||||
@test "docker load should return success,every node should load the image" {
|
||||
# create a tar file
|
||||
docker pull busybox:latest
|
||||
docker save -o $IMAGE_FILE busybox:latest
|
||||
# create a tar file
|
||||
docker pull busybox:latest
|
||||
docker save -o $IMAGE_FILE busybox:latest
|
||||
|
||||
start_docker 2
|
||||
start_manager
|
||||
start_docker 2
|
||||
swarm_manage
|
||||
|
||||
run docker_swarm -i $IMAGE_FILE
|
||||
[ "$status" -eq 0 ]
|
||||
run docker_swarm load -i $IMAGE_FILE
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run docker -H ${HOSTS[0]} images
|
||||
[ "${#lines[@]}" -eq 2 ]
|
||||
run docker -H ${HOSTS[0]} images
|
||||
[ "${#lines[@]}" -eq 2 ]
|
||||
|
||||
run docker -H ${HOSTS[1]} images
|
||||
[ "${#lines[@]}" -eq 2 ]
|
||||
run docker -H ${HOSTS[1]} images
|
||||
[ "${#lines[@]}" -eq 2 ]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue