add -c test

Signed-off-by: Victor Vieux <victorvieux@gmail.com>
This commit is contained in:
Victor Vieux 2015-06-04 17:15:13 -07:00
parent 5b358156de
commit 6c9bf75dcd
1 changed files with 11 additions and 0 deletions

View File

@ -22,6 +22,17 @@ function teardown() {
[ -n $(docker_swarm ps -q --filter=name=test_container --filter=status=running) ]
}
@test "docker run with resources" {
start_docker_with_busybox 2
swarm_manage
# run
docker_swarm run -d --name test_container -c 1 busybox sleep 100
# verify, container is running
[ -n $(docker_swarm ps -q --filter=name=test_container --filter=status=running) ]
}
@test "docker run not enough resources" {
start_docker_with_busybox 1
swarm_manage