mirror of https://github.com/docker/docs.git
add test when container is not running
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
This commit is contained in:
parent
28043dfd7d
commit
a313f46bb8
|
@ -190,7 +190,15 @@ function teardown() {
|
|||
@test "docker exec" {
|
||||
start_docker 3
|
||||
swarm_manage
|
||||
run docker_swarm run -d --name test_container busybox sleep 100
|
||||
run docker_swarm create --name test_container busybox sleep 100
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
# if container is not runing, exec will failed
|
||||
run docker_swarm exec test_container ls
|
||||
[ "$status" -ne 0 ]
|
||||
[[ "$output" == *"is not running"* ]]
|
||||
|
||||
run docker_swarm start test_container
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
# make sure container is up and not paused
|
||||
|
|
Loading…
Reference in New Issue