mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 05:36:12 +00:00
Fix validation logic in E2ETestNodePreparer.
This commit is contained in:
@@ -4875,8 +4875,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.")
|
||||
|
Reference in New Issue
Block a user