Skip to content

Commit

Permalink
CSV e2e - wait for 2 pods ready before delete one pod (#2554)
Browse files Browse the repository at this point in the history
Signed-off-by: akihikokuroda <akihikokuroda2020@gmail.com>
  • Loading branch information
akihikokuroda committed Jan 14, 2022
1 parent c914d09 commit dd0d7fd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/e2e/csv_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,14 @@ var _ = Describe("ClusterServiceVersion", func() {
})

It("remains in phase Succeeded when only one pod is available", func() {
Eventually(func() int32 {
dep, err := c.GetDeployment(testNamespace, "deployment")
if err != nil || dep == nil {
return 0
}
return dep.Status.ReadyReplicas
}).Should(Equal(int32(2)))

var ps corev1.PodList
Expect(ctx.Ctx().Client().List(context.Background(), &ps, client.MatchingLabels{"app": "foobar"})).To(Succeed())
Expect(ps.Items).To(Not(BeEmpty()))
Expand Down

0 comments on commit dd0d7fd

Please sign in to comment.