Merge pull request #57331 from aleksandra-malinowska/autoscaling-test-fix-13

Automatic merge from submit-queue (batch tested with PRs 56108, 56811, 57335, 57331, 54530). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

E2E autoscaling test scenario "should add node to the particular mig" fix

Resize targeted MIG to one to fix flakes when initial size of it is zero. Scale-up from zero doesn't make sense in this scenario, and the test assumes there will be always at least one node.
This commit is contained in:
Kubernetes Submit Queue 2017-12-18 17:45:40 -08:00 committed by GitHub
commit 16bbdfe9b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -415,6 +415,15 @@ var _ = SIGDescribe("Cluster size autoscaling [Slow]", func() {
}
}
if minSize == 0 {
newSizes := make(map[string]int)
for mig, size := range originalSizes {
newSizes[mig] = size
}
newSizes[minMig] = 1
setMigSizes(newSizes)
}
removeLabels := func(nodesToClean sets.String) {
By("Removing labels from nodes")
for node := range nodesToClean {