Skip to content

Commit

Permalink
Check that deployment ready replicas greater than zero
Browse files Browse the repository at this point in the history
There is a case where both ReadyReplicas and Replicas are 0
and the Eventually passes. Adding this to avoid this situation.

Signed-off-by: Ori Braunshtein <obraunsh@redhat.com>
  • Loading branch information
oribon authored and sabinaaledort committed Nov 14, 2021
1 parent 22afa1a commit d6723b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/e2e/functional/tests/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ var _ = Describe("metallb", func() {
if err != nil {
return false
}
return deploy.Status.ReadyReplicas == deploy.Status.Replicas
return deploy.Status.ReadyReplicas > 0 && deploy.Status.ReadyReplicas == deploy.Status.Replicas
}, metallbutils.DeployTimeout, metallbutils.Interval).Should(BeTrue())

pods, err := testclient.Client.Pods(OperatorNameSpace).List(context.Background(), metav1.ListOptions{
Expand Down

0 comments on commit d6723b4

Please sign in to comment.