mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Fix incorrect condition in deployment rollover e2e test
This commit is contained in:
parent
e663dbc302
commit
7d5db746bf
@ -292,18 +292,13 @@ func testRolloverDeployment(f *Framework) {
|
||||
deployment, err := c.Deployments(ns).Get(deploymentName)
|
||||
// Make sure the deployment starts to scale up and down RCs
|
||||
waitForPartialEvents(c, ns, deployment, 2)
|
||||
events, err := c.Events(ns).Search(deployment)
|
||||
if err != nil {
|
||||
Logf("error in listing events: %s", err)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
}
|
||||
newRC, err := deploymentutil.GetNewRC(*deployment, c)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(newRC).NotTo(Equal(nil))
|
||||
|
||||
// Before the deployment finishes, update the deployment to rollover the above 2 rcs and bring up redis pods.
|
||||
// If the deployment already finished here, the test would fail. When this happens, increase its minReadySeconds or replicas to prevent it.
|
||||
Expect(len(events.Items)).Should(BeNumerically("<", deploymentReplicas))
|
||||
Expect(newRC.Spec.Replicas).Should(BeNumerically("<", deploymentReplicas))
|
||||
updatedDeploymentImage := "redis"
|
||||
newDeployment.Spec.Template.Spec.Containers[0].Name = updatedDeploymentImage
|
||||
newDeployment.Spec.Template.Spec.Containers[0].Image = updatedDeploymentImage
|
||||
|
Loading…
Reference in New Issue
Block a user