mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Avoid unnecessary gcloud call if test was skipped
This commit is contained in:
parent
ee80933d34
commit
73a1227f39
@ -68,9 +68,13 @@ var _ = SIGDescribe("[Feature:ClusterSizeAutoscalingScaleUp] [Slow] Autoscaling"
|
|||||||
})
|
})
|
||||||
|
|
||||||
AfterEach(func() {
|
AfterEach(func() {
|
||||||
// Scale down back to only 'nodesNum' nodes, as expected at the start of the test.
|
// Attempt cleanup only if a node group was targeted for scale up.
|
||||||
framework.ExpectNoError(framework.ResizeGroup(nodeGroupName, nodesNum))
|
// Otherwise the test was probably skipped and we'll get a gcloud error due to invalid parameters.
|
||||||
framework.ExpectNoError(framework.WaitForReadyNodes(f.ClientSet, nodesNum, 15*time.Minute))
|
if len(nodeGroupName) > 0 {
|
||||||
|
// Scale down back to only 'nodesNum' nodes, as expected at the start of the test.
|
||||||
|
framework.ExpectNoError(framework.ResizeGroup(nodeGroupName, nodesNum))
|
||||||
|
framework.ExpectNoError(framework.WaitForReadyNodes(f.ClientSet, nodesNum, 15*time.Minute))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
Measure("takes less than 15 minutes", func(b Benchmarker) {
|
Measure("takes less than 15 minutes", func(b Benchmarker) {
|
||||||
|
Loading…
Reference in New Issue
Block a user