mirror of
https://github.com/docker/docs.git
synced 2026-04-12 14:25:46 +07:00
Merge pull request #609 from jimmyxian/add-support-imageload
Add support "docker load" api
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user