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)
|
IMAGE_FILE=$(mktemp)
|
||||||
|
|
||||||
function teardown() {
|
function teardown() {
|
||||||
stop_manager
|
stop_docker
|
||||||
stop_docker
|
swarm_manage_cleanup
|
||||||
rm -f $IMAGE_FILE
|
rm -f $IMAGE_FILE
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "docker load should return success,every node should load the image" {
|
@test "docker load should return success,every node should load the image" {
|
||||||
# create a tar file
|
# create a tar file
|
||||||
docker pull busybox:latest
|
docker pull busybox:latest
|
||||||
docker save -o $IMAGE_FILE busybox:latest
|
docker save -o $IMAGE_FILE busybox:latest
|
||||||
|
|
||||||
start_docker 2
|
start_docker 2
|
||||||
start_manager
|
swarm_manage
|
||||||
|
|
||||||
run docker_swarm -i $IMAGE_FILE
|
run docker_swarm load -i $IMAGE_FILE
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
|
|
||||||
run docker -H ${HOSTS[0]} images
|
run docker -H ${HOSTS[0]} images
|
||||||
[ "${#lines[@]}" -eq 2 ]
|
[ "${#lines[@]}" -eq 2 ]
|
||||||
|
|
||||||
run docker -H ${HOSTS[1]} images
|
run docker -H ${HOSTS[1]} images
|
||||||
[ "${#lines[@]}" -eq 2 ]
|
[ "${#lines[@]}" -eq 2 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue