[node-operator] autoscalingstrategy-controller: improve test robustness (#372)

This commit is contained in:
Malte Poll 2022-08-17 18:38:54 +02:00 committed by GitHub
parent 4176f038df
commit f050a301d0

View File

@ -129,6 +129,13 @@ var _ = Describe("AutoscalingStrategy controller", func() {
Eventually(checkDeploymentReplicas, timeout, interval).Should(Equal(int32(1)))
By("checking the autoscaling strategy status shows one replica")
Eventually(func() (int32, error) {
err := k8sClient.Get(ctx, strategyLookupKey, createdStrategy)
if err != nil {
return -1, err
}
return createdStrategy.Status.Replicas, nil
}, duration, interval).Should(Equal(int32(1)))
Consistently(func() (int32, error) {
err := k8sClient.Get(ctx, strategyLookupKey, createdStrategy)
if err != nil {