From 8d2c81e7ec7c6d9a6d37e37f6032fc6922bc2eb4 Mon Sep 17 00:00:00 2001 From: Yoon Park Date: Sun, 26 Feb 2023 13:53:04 +0900 Subject: [PATCH] Fix comments at fit_test.go to increase redability --- .../framework/plugins/noderesources/fit_test.go | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/pkg/scheduler/framework/plugins/noderesources/fit_test.go b/pkg/scheduler/framework/plugins/noderesources/fit_test.go index ffe5a26969ba..069b555281ba 100644 --- a/pkg/scheduler/framework/plugins/noderesources/fit_test.go +++ b/pkg/scheduler/framework/plugins/noderesources/fit_test.go @@ -534,25 +534,25 @@ func TestNotEnoughRequests(t *testing.T) { { pod: &v1.Pod{}, nodeInfo: framework.NewNodeInfo(newResourcePod(framework.Resource{MilliCPU: 10, Memory: 20})), - name: "even without specified resources predicate fails when there's no space for additional pod", + name: "even without specified resources, predicate fails when there's no space for additional pod", wantStatus: framework.NewStatus(framework.Unschedulable, "Too many pods"), }, { pod: newResourcePod(framework.Resource{MilliCPU: 1, Memory: 1}), nodeInfo: framework.NewNodeInfo(newResourcePod(framework.Resource{MilliCPU: 5, Memory: 5})), - name: "even if both resources fit predicate fails when there's no space for additional pod", + name: "even if both resources fit, predicate fails when there's no space for additional pod", wantStatus: framework.NewStatus(framework.Unschedulable, "Too many pods"), }, { pod: newResourcePod(framework.Resource{MilliCPU: 5, Memory: 1}), nodeInfo: framework.NewNodeInfo(newResourcePod(framework.Resource{MilliCPU: 5, Memory: 19})), - name: "even for equal edge case predicate fails when there's no space for additional pod", + name: "even for equal edge case, predicate fails when there's no space for additional pod", wantStatus: framework.NewStatus(framework.Unschedulable, "Too many pods"), }, { pod: newResourceInitPod(newResourcePod(framework.Resource{MilliCPU: 5, Memory: 1}), framework.Resource{MilliCPU: 5, Memory: 1}), nodeInfo: framework.NewNodeInfo(newResourcePod(framework.Resource{MilliCPU: 5, Memory: 19})), - name: "even for equal edge case predicate fails when there's no space for additional pod due to init container", + name: "even for equal edge case, predicate fails when there's no space for additional pod due to init container", wantStatus: framework.NewStatus(framework.Unschedulable, "Too many pods"), }, } @@ -587,18 +587,11 @@ func TestStorageRequests(t *testing.T) { name string wantStatus *framework.Status }{ - { - pod: newResourcePod(framework.Resource{MilliCPU: 1, Memory: 1}), - nodeInfo: framework.NewNodeInfo( - newResourcePod(framework.Resource{MilliCPU: 10, Memory: 10})), - name: "due to container scratch disk", - wantStatus: framework.NewStatus(framework.Unschedulable, getErrReason(v1.ResourceCPU)), - }, { pod: newResourcePod(framework.Resource{MilliCPU: 1, Memory: 1}), nodeInfo: framework.NewNodeInfo( newResourcePod(framework.Resource{MilliCPU: 2, Memory: 10})), - name: "pod fit", + name: "empty storage requested, and pod fits", }, { pod: newResourcePod(framework.Resource{EphemeralStorage: 25}),