List RSes once when getting old/new RSes in deployment e2e tests

This commit is contained in:
Janet Kuo
2016-06-01 14:14:40 -07:00
parent 06f742a5ea
commit 2ced966cd5
5 changed files with 52 additions and 36 deletions

View File

@@ -2834,11 +2834,7 @@ func WaitForDeploymentStatus(c clientset.Interface, ns, deploymentName string, d
if err != nil {
return false, err
}
oldRSs, allOldRSs, err = deploymentutil.GetOldReplicaSets(deployment, c)
if err != nil {
return false, err
}
newRS, err = deploymentutil.GetNewReplicaSet(deployment, c)
oldRSs, allOldRSs, newRS, err = deploymentutil.GetAllReplicaSets(deployment, c)
if err != nil {
return false, err
}