From d6bd288fb08eef54df412fe3a76a029d1fdb3a6b Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Mon, 1 Jun 2015 16:46:01 -0700 Subject: [PATCH] add docker run not enough resources 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 2cb038eb87..f3f4c99042 100644 --- a/test/integration/api/run.bats +++ b/test/integration/api/run.bats @@ -21,3 +21,14 @@ function teardown() { # 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 + + run docker_swarm run -d --name test_container -m 1000g busybox ls + [ "$status" -ne 0 ] + + run docker_swarm run -d --name test_container -c 1000 busybox ls + [ "$status" -ne 0 ] +}