Updated NewSnapshot interface to accept a NodeInfoMap instead of lists of nodes and pods

This commit is contained in:
Abdullah Gharaibeh
2019-11-12 11:14:17 -05:00
parent 805eecf692
commit 902cf48cd3
35 changed files with 150 additions and 162 deletions

View File

@@ -379,7 +379,7 @@ func TestNodeResourcesBalancedAllocation(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
snapshot := nodeinfosnapshot.NewSnapshot(test.pods, test.nodes)
snapshot := nodeinfosnapshot.NewSnapshot(nodeinfosnapshot.CreateNodeInfoMap(test.pods, test.nodes))
if len(test.pod.Spec.Volumes) > 0 {
maxVolumes := 5
nodeInfoList, _ := snapshot.NodeInfos().List()