From 3921a2a2f6db7d4ba8fe143414b74e7d65c8677b Mon Sep 17 00:00:00 2001 From: Michail Kargakis Date: Wed, 1 Mar 2017 19:25:12 +0100 Subject: [PATCH] e2e: require minimum completeness in deployment tests --- test/e2e/framework/util.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 884c18647dd..203b611ce32 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -3161,9 +3161,7 @@ func WaitForDeploymentStatusValid(c clientset.Interface, d *extensions.Deploymen } // When the deployment status and its underlying resources reach the desired state, we're done - if deployment.Status.Replicas == *(deployment.Spec.Replicas) && - deployment.Status.UpdatedReplicas == *(deployment.Spec.Replicas) && - deployment.Status.AvailableReplicas == *(deployment.Spec.Replicas) { + if deploymentutil.DeploymentComplete(deployment, &deployment.Status) { return true, nil } @@ -3229,11 +3227,7 @@ func WaitForDeploymentStatus(c clientset.Interface, d *extensions.Deployment) er } // When the deployment status and its underlying resources reach the desired state, we're done - if deployment.Status.Replicas == *(deployment.Spec.Replicas) && - deployment.Status.UpdatedReplicas == *(deployment.Spec.Replicas) { - return true, nil - } - return false, nil + return deploymentutil.DeploymentComplete(deployment, &deployment.Status), nil }) if err == wait.ErrWaitTimeout {