Merge pull request #26654 from janetkuo/e2e-deployment-list-rs
Automatic merge from submit-queue List RSes once when getting old/new RSes in deployment e2e tests Ref #26509 []()
This commit is contained in:
@@ -927,13 +927,11 @@ func testDeploymentLabelAdopted(f *framework.Framework) {
|
||||
// There should be no old RSs (overlapping RS)
|
||||
deployment, err := c.Extensions().Deployments(ns).Get(deploymentName)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
oldRSs, allOldRSs, err := deploymentutil.GetOldReplicaSets(deployment, c)
|
||||
oldRSs, allOldRSs, newRS, err := deploymentutil.GetAllReplicaSets(deployment, c)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(len(oldRSs)).Should(Equal(0))
|
||||
Expect(len(allOldRSs)).Should(Equal(0))
|
||||
// New RS should contain pod-template-hash in its selector, label, and template label
|
||||
newRS, err := deploymentutil.GetNewReplicaSet(deployment, c)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
err = framework.CheckRSHashLabel(newRS)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
// All pods targeted by the deployment should contain pod-template-hash in their labels, and there should be only 3 pods
|
||||
|
||||
@@ -2863,11 +2863,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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user