Commit 339e2f47 authored by Maciej Borsz's avatar Maciej Borsz

Fix validation logic in E2ETestNodePreparer.

parent 54dbbc41
...@@ -4875,8 +4875,8 @@ func NewE2ETestNodePreparer(client clientset.Interface, countToStrategy []testut ...@@ -4875,8 +4875,8 @@ func NewE2ETestNodePreparer(client clientset.Interface, countToStrategy []testut
func (p *E2ETestNodePreparer) PrepareNodes() error { func (p *E2ETestNodePreparer) PrepareNodes() error {
nodes := GetReadySchedulableNodesOrDie(p.client) nodes := GetReadySchedulableNodesOrDie(p.client)
numTemplates := 0 numTemplates := 0
for k := range p.countToStrategy { for _, v := range p.countToStrategy {
numTemplates += k numTemplates += v.Count
} }
if numTemplates > len(nodes.Items) { if numTemplates > len(nodes.Items) {
return fmt.Errorf("Can't prepare Nodes. Got more templates than existing Nodes.") return fmt.Errorf("Can't prepare Nodes. Got more templates than existing Nodes.")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment