unskip and fix a few tests

Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
Victor Vieux 2015-04-03 00:27:09 +00:00
parent 0131e5f92c
commit f3d64cfad3
1 changed files with 16 additions and 5 deletions

View File

@ -16,24 +16,35 @@ function teardown() {
} }
@test "docker ps -n 3 should return the 3 last containers, including non running one" { @test "docker ps -n 3 should return the 3 last containers, including non running one" {
skip
start_docker 1 start_docker 1
start_manager start_manager
run docker_swarm run -d busybox sleep 42 run docker_swarm run -d busybox sleep 42
run docker_swarm run -d busybox false run docker_swarm run -d busybox false
run docker_swarm run -d busybox true run docker_swarm ps -n 3
run docker_swarm ps -a -n 3
[ "${#lines[@]}" -eq 3 ] [ "${#lines[@]}" -eq 3 ]
run docker_swarm run -d busybox true
run docker_swarm ps -n 3
[ "${#lines[@]}" -eq 4 ]
run docker_swarm run -d busybox true
run docker_swarm ps -n 3
[ "${#lines[@]}" -eq 4 ]
} }
@test "docker ps -l should return the last container, including non running one" { @test "docker ps -l should return the last container, including non running one" {
skip
start_docker 1 start_docker 1
start_manager start_manager
run docker_swarm run -d busybox sleep 42 run docker_swarm run -d busybox sleep 42
run docker_swarm run -d busybox false sleep 1 #sleep so the 2 containers don't start at the same second
run docker_swarm run -d busybox true run docker_swarm run -d busybox true
run docker_swarm ps -l run docker_swarm ps -l
[ "${#lines[@]}" -eq 2 ] [ "${#lines[@]}" -eq 2 ]
[[ "${lines[1]}" == *"true"* ]] [[ "${lines[1]}" == *"true"* ]]
sleep 1 #sleep so the container doesn't start at the same second as 'busybox true'
run docker_swarm run -d busybox false
run docker_swarm ps -l
[ "${#lines[@]}" -eq 2 ]
[[ "${lines[1]}" == *"false"* ]]
} }