Merge pull request #609 from jimmyxian/add-support-imageload

Add support "docker load" api
This commit is contained in:
Andrea Luzzardi
2015-04-24 17:21:11 -07:00
7 changed files with 118 additions and 4 deletions

View File

@@ -259,9 +259,37 @@ function teardown() {
[[ "${lines[1]}" == *"Exited"* ]]
}
# FIXME
@test "docker load" {
skip
# temp file for saving image
IMAGE_FILE=$(mktemp)
# create a tar file
docker pull busybox:latest
docker save -o $IMAGE_FILE busybox:latest
start_docker 2
swarm_manage
run docker_swarm images -q
[ "$status" -eq 0 ]
[ "${#lines[@]}" -eq 0 ]
run docker_swarm load -i $IMAGE_FILE
[ "$status" -eq 0 ]
# check node0
run docker -H ${HOSTS[0]} images
[ "${#lines[@]}" -eq 2 ]
[[ "${lines[1]}" == *"busybox"* ]]
# check node1
run docker -H ${HOSTS[1]} images
[ "${#lines[@]}" -eq 2 ]
[[ "${lines[1]}" == *"busybox"* ]]
rm -f $IMAGE_FILE
}
}
# FIXME