Skip to content

Commit

Permalink
AwaitGatewayWithStatus exits prematurely
Browse files Browse the repository at this point in the history
If the Gateway is found but doesn't have the expected status, it returns
an error which stops the retry loop and fails. It should return a nil
error with a message string so it keeps retrying.

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
  • Loading branch information
tpantelis committed Oct 23, 2023
1 parent 10c826d commit c9bb11b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/e2e/framework/gateways.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ func (f *Framework) AwaitGatewayWithStatus(cluster ClusterIndex, name, status st
gw := result.(*unstructured.Unstructured)
haStatus := NestedString(gw.Object, "status", "haStatus")
if haStatus != status {
return false, "", fmt.Errorf("gateway %q exists but has wrong status %q, expected %q",
gw.GetName(), haStatus, status)
return false, fmt.Sprintf("gateway %q exists but has wrong status %q, expected %q", gw.GetName(), haStatus, status), nil
}
return true, "", nil
})
Expand Down

0 comments on commit c9bb11b

Please sign in to comment.