@@ -45,7 +45,7 @@ func TestCheckDelta(t *testing.T) {
4545 quota : & fakeQuota {id : "limiter1" , appliesToFn : func (* apiv1.Node ) bool { return true }},
4646 limitsLeft : resourceList {"cpu" : 10 , "memory" : 1000 , "nodes" : 5 },
4747 },
48- }, newNodeCache (& fakeCustomResourcesProcessor {})),
48+ }, newNodeResourcesCache (& fakeCustomResourcesProcessor {})),
4949 node : test .BuildTestNode ("n1" , 1000 , 200 ),
5050 nodeDelta : 2 ,
5151 wantResult : & CheckDeltaResult {
@@ -59,7 +59,7 @@ func TestCheckDelta(t *testing.T) {
5959 quota : & fakeQuota {id : "limiter1" , appliesToFn : func (* apiv1.Node ) bool { return true }},
6060 limitsLeft : resourceList {"cpu" : 1 , "memory" : 1000 , "nodes" : 5 },
6161 },
62- }, newNodeCache (& fakeCustomResourcesProcessor {})),
62+ }, newNodeResourcesCache (& fakeCustomResourcesProcessor {})),
6363 node : test .BuildTestNode ("n1" , 1000 , 200 ),
6464 nodeDelta : 2 ,
6565 wantResult : & CheckDeltaResult {
@@ -77,7 +77,7 @@ func TestCheckDelta(t *testing.T) {
7777 quota : & fakeQuota {id : "limiter1" , appliesToFn : func (* apiv1.Node ) bool { return true }},
7878 limitsLeft : resourceList {"cpu" : 1 , "memory" : 300 , "nodes" : 5 },
7979 },
80- }, newNodeCache (& fakeCustomResourcesProcessor {})),
80+ }, newNodeResourcesCache (& fakeCustomResourcesProcessor {})),
8181 node : test .BuildTestNode ("n1" , 1000 , 200 ),
8282 nodeDelta : 2 ,
8383 wantResult : & CheckDeltaResult {
@@ -99,7 +99,7 @@ func TestCheckDelta(t *testing.T) {
9999 quota : & fakeQuota {id : "limiter2" , appliesToFn : func (* apiv1.Node ) bool { return true }},
100100 limitsLeft : resourceList {"cpu" : 10 , "memory" : 300 , "nodes" : 5 },
101101 },
102- }, newNodeCache (& fakeCustomResourcesProcessor {})),
102+ }, newNodeResourcesCache (& fakeCustomResourcesProcessor {})),
103103 node : test .BuildTestNode ("n1" , 1000 , 200 ),
104104 nodeDelta : 2 ,
105105 wantResult : & CheckDeltaResult {
@@ -122,7 +122,7 @@ func TestCheckDelta(t *testing.T) {
122122 quota : & fakeQuota {id : "limiter2" , appliesToFn : func (* apiv1.Node ) bool { return false }},
123123 limitsLeft : resourceList {"cpu" : 10 , "memory" : 300 , "nodes" : 5 },
124124 },
125- }, newNodeCache (& fakeCustomResourcesProcessor {})),
125+ }, newNodeResourcesCache (& fakeCustomResourcesProcessor {})),
126126 node : test .BuildTestNode ("n1" , 1000 , 200 ),
127127 nodeDelta : 2 ,
128128 wantResult : & CheckDeltaResult {
@@ -140,7 +140,7 @@ func TestCheckDelta(t *testing.T) {
140140 quota : & fakeQuota {id : "limiter1" , appliesToFn : func (* apiv1.Node ) bool { return false }},
141141 limitsLeft : resourceList {"cpu" : 1 , "memory" : 100 , "nodes" : 1 },
142142 },
143- }, newNodeCache (& fakeCustomResourcesProcessor {})),
143+ }, newNodeResourcesCache (& fakeCustomResourcesProcessor {})),
144144 node : test .BuildTestNode ("n1" , 1000 , 200 ),
145145 nodeDelta : 2 ,
146146 wantResult : & CheckDeltaResult {
@@ -154,7 +154,7 @@ func TestCheckDelta(t *testing.T) {
154154 quota : & fakeQuota {id : "limiter1" , appliesToFn : func (* apiv1.Node ) bool { return true }},
155155 limitsLeft : resourceList {"cpu" : 4 , "memory" : 32 * units .GiB , "gpu" : 2 },
156156 },
157- }, newNodeCache (& fakeCustomResourcesProcessor {})),
157+ }, newNodeResourcesCache (& fakeCustomResourcesProcessor {})),
158158 node : test .BuildTestNode ("n1" , 1000 , 2000 ),
159159 nodeDelta : 2 ,
160160 wantResult : & CheckDeltaResult {
@@ -168,7 +168,7 @@ func TestCheckDelta(t *testing.T) {
168168 quota : & fakeQuota {id : "limiter1" , appliesToFn : func (* apiv1.Node ) bool { return true }},
169169 limitsLeft : resourceList {"cpu" : 4 , "memory" : 32 * units .GiB },
170170 },
171- }, newNodeCache (& fakeCustomResourcesProcessor {NodeResourceTargets : func (node * apiv1.Node ) []customresources.CustomResourceTarget {
171+ }, newNodeResourcesCache (& fakeCustomResourcesProcessor {NodeResourceTargets : func (node * apiv1.Node ) []customresources.CustomResourceTarget {
172172 return []customresources.CustomResourceTarget {
173173 {
174174 ResourceType : "gpu" ,
@@ -219,7 +219,7 @@ func TestApplyDelta(t *testing.T) {
219219 quota : & fakeQuota {id : "limiter1" , appliesToFn : func (* apiv1.Node ) bool { return true }},
220220 limitsLeft : resourceList {"cpu" : 10 , "memory" : 1000 , "nodes" : 5 },
221221 },
222- }, newNodeCache (& fakeCustomResourcesProcessor {})),
222+ }, newNodeResourcesCache (& fakeCustomResourcesProcessor {})),
223223 node : test .BuildTestNode ("n1" , 1000 , 200 ),
224224 nodeDelta : 2 ,
225225 wantResult : & CheckDeltaResult {
@@ -236,7 +236,7 @@ func TestApplyDelta(t *testing.T) {
236236 quota : & fakeQuota {id : "limiter1" , appliesToFn : func (* apiv1.Node ) bool { return true }},
237237 limitsLeft : resourceList {"cpu" : 3 , "memory" : 1000 , "nodes" : 5 },
238238 },
239- }, newNodeCache (& fakeCustomResourcesProcessor {})),
239+ }, newNodeResourcesCache (& fakeCustomResourcesProcessor {})),
240240 node : test .BuildTestNode ("n1" , 2000 , 200 ),
241241 nodeDelta : 2 ,
242242 wantResult : & CheckDeltaResult {
@@ -256,7 +256,7 @@ func TestApplyDelta(t *testing.T) {
256256 quota : & fakeQuota {id : "limiter1" , appliesToFn : func (* apiv1.Node ) bool { return true }},
257257 limitsLeft : resourceList {"cpu" : 1 , "memory" : 100 , "nodes" : 5 },
258258 },
259- }, newNodeCache (& fakeCustomResourcesProcessor {})),
259+ }, newNodeResourcesCache (& fakeCustomResourcesProcessor {})),
260260 node : test .BuildTestNode ("n1" , 2000 , 200 ),
261261 nodeDelta : 1 ,
262262 wantResult : & CheckDeltaResult {
@@ -276,7 +276,7 @@ func TestApplyDelta(t *testing.T) {
276276 quota : & fakeQuota {id : "limiter1" , appliesToFn : func (* apiv1.Node ) bool { return true }},
277277 limitsLeft : resourceList {"cpu" : 2 , "memory" : 500 , "nodes" : 10 },
278278 },
279- }, newNodeCache (& fakeCustomResourcesProcessor {})),
279+ }, newNodeResourcesCache (& fakeCustomResourcesProcessor {})),
280280 node : test .BuildTestNode ("n1" , 1000 , 200 ),
281281 nodeDelta : 2 ,
282282 wantResult : & CheckDeltaResult {
0 commit comments