From 50be8f48024de720dbed4145f49eec164a2b4866 Mon Sep 17 00:00:00 2001 From: Sun Hongliang Date: Tue, 3 May 2016 16:04:15 +0800 Subject: [PATCH] use --cpu-shares instead of -c in integration test Signed-off-by: Sun Hongliang --- test/integration/resource_management.bats | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/integration/resource_management.bats b/test/integration/resource_management.bats index eaba6d64bd..168bc8b3f2 100644 --- a/test/integration/resource_management.bats +++ b/test/integration/resource_management.bats @@ -61,7 +61,7 @@ function teardown() { start_docker_with_busybox 2 swarm_manage - run docker_swarm run -c 10240 busybox sh + run docker_swarm run --cpu-shares 10240 busybox sh [ "$status" -ne 0 ] [[ "${output}" == *"no resources available to schedule container"* ]] @@ -73,7 +73,7 @@ function teardown() { [ "$status" -eq 0 ] [[ "${output}" == *"Nodes: 2"* ]] - docker_swarm run --name container_test -c 1 busybox sh + docker_swarm run --name container_test --cpu-shares 1 busybox sh run docker_swarm info [ "$status" -eq 0 ] [[ "${output}" == *"Reserved CPUs: 1"* ]] @@ -90,13 +90,13 @@ function teardown() { start_docker_with_busybox 2 swarm_manage --strategy spread ${HOSTS[0]},${HOSTS[1]} - docker_swarm run --name container_test1 -c 1 busybox sh + docker_swarm run --name container_test1 --cpu-shares 1 busybox sh run docker_swarm info [ "$status" -eq 0 ] [[ "${output}" == *"Reserved CPUs: 1"* ]] [[ "${output}" == *"Reserved CPUs: 0"* ]] - docker_swarm run --name container_test2 -c 1 busybox sh + docker_swarm run --name container_test2 --cpu-shares 1 busybox sh run docker_swarm info [ "$status" -eq 0 ] [[ "${output}" == *"Reserved CPUs: 1"* ]] @@ -107,13 +107,13 @@ function teardown() { start_docker_with_busybox 2 swarm_manage --strategy binpack ${HOSTS[0]},${HOSTS[1]} - docker_swarm run --name container_test1 -c 1 busybox sh + docker_swarm run --name container_test1 --cpu-shares 1 busybox sh run docker_swarm info [ "$status" -eq 0 ] [[ "${output}" == *"Reserved CPUs: 1"* ]] [[ "${output}" == *"Reserved CPUs: 0"* ]] - docker_swarm run --name container_test2 -c 1 busybox sh + docker_swarm run --name container_test2 --cpu-shares 1 busybox sh run docker_swarm info [ "$status" -eq 0 ] [[ "${output}" == *"Reserved CPUs: 2"* ]]