Skip to content

Commit dd0d7fd

Browse files
CSV e2e - wait for 2 pods ready before delete one pod (#2554)
Signed-off-by: akihikokuroda <[email protected]>
1 parent c914d09 commit dd0d7fd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/e2e/csv_e2e_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,14 @@ var _ = Describe("ClusterServiceVersion", func() {
502502
})
503503

504504
It("remains in phase Succeeded when only one pod is available", func() {
505+
Eventually(func() int32 {
506+
dep, err := c.GetDeployment(testNamespace, "deployment")
507+
if err != nil || dep == nil {
508+
return 0
509+
}
510+
return dep.Status.ReadyReplicas
511+
}).Should(Equal(int32(2)))
512+
505513
var ps corev1.PodList
506514
Expect(ctx.Ctx().Client().List(context.Background(), &ps, client.MatchingLabels{"app": "foobar"})).To(Succeed())
507515
Expect(ps.Items).To(Not(BeEmpty()))

0 commit comments

Comments
 (0)