Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
kerenlahav committed May 8, 2024
1 parent 421cd16 commit c652d89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion controllers/servicebinding_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ func (r *ServiceBindingReconciler) poll(ctx context.Context, serviceBinding *ser
status, statusErr := smClient.Status(serviceBinding.Status.OperationURL, nil)
if statusErr != nil {
log.Info(fmt.Sprintf("failed to fetch operation, got error from SM: %s", statusErr.Error()), "operationURL", serviceBinding.Status.OperationURL)
utils.SetFailureConditions(serviceBinding.Status.OperationType, string(smClientTypes.INPROGRESS), serviceBinding)
utils.SetInProgressConditions(ctx, serviceBinding.Status.OperationType, string(smClientTypes.INPROGRESS), serviceBinding)
freshStatus := servicesv1.ServiceBindingStatus{
Conditions: serviceBinding.GetConditions(),
}
Expand Down
4 changes: 2 additions & 2 deletions controllers/servicebinding_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1082,8 +1082,8 @@ stringData:
if err != nil {
return false
}
failedCond := meta.FindStatusCondition(createdBinding.GetConditions(), common.ConditionFailed)
return failedCond != nil && strings.Contains(failedCond.Message, "no polling for you")
cond := meta.FindStatusCondition(createdBinding.GetConditions(), common.ConditionSucceeded)
return cond != nil && strings.Contains(cond.Message, string(smClientTypes.INPROGRESS))
}, timeout, interval).Should(BeTrue())
fakeClient.UnbindReturns("", nil)
deleteAndValidate(createdBinding)
Expand Down

0 comments on commit c652d89

Please sign in to comment.