e2e: require minimum completeness in deployment tests

This commit is contained in:
Michail Kargakis 2017-03-01 19:25:12 +01:00
parent c7b53794d0
commit 3921a2a2f6

View File

@ -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 // When the deployment status and its underlying resources reach the desired state, we're done
if deployment.Status.Replicas == *(deployment.Spec.Replicas) && if deploymentutil.DeploymentComplete(deployment, &deployment.Status) {
deployment.Status.UpdatedReplicas == *(deployment.Spec.Replicas) &&
deployment.Status.AvailableReplicas == *(deployment.Spec.Replicas) {
return true, nil 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 // When the deployment status and its underlying resources reach the desired state, we're done
if deployment.Status.Replicas == *(deployment.Spec.Replicas) && return deploymentutil.DeploymentComplete(deployment, &deployment.Status), nil
deployment.Status.UpdatedReplicas == *(deployment.Spec.Replicas) {
return true, nil
}
return false, nil
}) })
if err == wait.ErrWaitTimeout { if err == wait.ErrWaitTimeout {