diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 1637aee2224..31782561703 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -4876,8 +4876,8 @@ func NewE2ETestNodePreparer(client clientset.Interface, countToStrategy []testut func (p *E2ETestNodePreparer) PrepareNodes() error { nodes := GetReadySchedulableNodesOrDie(p.client) numTemplates := 0 - for k := range p.countToStrategy { - numTemplates += k + for _, v := range p.countToStrategy { + numTemplates += v.Count } if numTemplates > len(nodes.Items) { return fmt.Errorf("Can't prepare Nodes. Got more templates than existing Nodes.")