From b4c106426ef910df235b0a2831b4643bf9300283 Mon Sep 17 00:00:00 2001 From: lixiaobing10051267 Date: Fri, 8 Jul 2016 15:43:03 +0800 Subject: [PATCH] Add test case to TestPodFitsResources() --- .../scheduler/algorithm/predicates/predicates_test.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) mode change 100644 => 100755 plugin/pkg/scheduler/algorithm/predicates/predicates_test.go diff --git a/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go b/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go old mode 100644 new mode 100755 index 1a94b1767e..4867da6726 --- a/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go +++ b/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go @@ -196,12 +196,20 @@ func TestPodFitsResources(t *testing.T) { test: "both resources fit", wErr: nil, }, + { + pod: newResourcePod(resourceRequest{milliCPU: 2, memory: 1}), + nodeInfo: schedulercache.NewNodeInfo( + newResourcePod(resourceRequest{milliCPU: 9, memory: 5})), + fits: false, + test: "one resource memory fits", + wErr: newInsufficientResourceError(cpuResourceName, 2, 9, 10), + }, { pod: newResourcePod(resourceRequest{milliCPU: 1, memory: 2}), nodeInfo: schedulercache.NewNodeInfo( newResourcePod(resourceRequest{milliCPU: 5, memory: 19})), fits: false, - test: "one resources fits", + test: "one resource cpu fits", wErr: newInsufficientResourceError(memoryResourceName, 2, 19, 20), }, {