From 6c9bf75dcd51ff3da93dff91627d65714b4563e4 Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Thu, 4 Jun 2015 17:15:13 -0700 Subject: [PATCH] add -c test Signed-off-by: Victor Vieux --- test/integration/api/run.bats | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/integration/api/run.bats b/test/integration/api/run.bats index f3f4c99042..f0f4ed02bb 100644 --- a/test/integration/api/run.bats +++ b/test/integration/api/run.bats @@ -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