mirror of
https://github.com/docker/docs.git
synced 2026-04-02 09:18:57 +07:00
@@ -11,17 +11,15 @@ function teardown() {
|
||||
start_docker_with_busybox 2
|
||||
swarm_manage
|
||||
|
||||
run docker_swarm run -d --name test_container busybox
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
docker_swarm create --name test_container busybox
|
||||
|
||||
# make sure container exsists
|
||||
run docker_swarm ps -l
|
||||
[ "${#lines[@]}" -eq 2 ]
|
||||
[[ "${lines[1]}" == *"test_container"* ]]
|
||||
|
||||
run docker_swarm rm test_container
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
docker_swarm rm test_container
|
||||
|
||||
# verify
|
||||
run docker_swarm ps -aq
|
||||
[ "${#lines[@]}" -eq 0 ]
|
||||
@@ -31,8 +29,7 @@ function teardown() {
|
||||
start_docker_with_busybox 2
|
||||
swarm_manage
|
||||
|
||||
run docker_swarm run -d --name test_container busybox sleep 500
|
||||
[ "$status" -eq 0 ]
|
||||
docker_swarm run -d --name test_container busybox sleep 500
|
||||
|
||||
# make sure container exsists and is up
|
||||
run docker_swarm ps -a
|
||||
@@ -45,8 +42,7 @@ function teardown() {
|
||||
[ "$status" -ne 0 ]
|
||||
|
||||
# rm -f, remove a running container
|
||||
run docker_swarm rm -f test_container
|
||||
[ "$status" -eq 0 ]
|
||||
docker_swarm rm -f test_container
|
||||
|
||||
# verify
|
||||
run docker_swarm ps -aq
|
||||
|
||||
Reference in New Issue
Block a user