Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maralavi committed Jul 26, 2022
1 parent 796e9f4 commit 8fc4a78
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions addons/controllers/packageinstallstatus_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,13 @@ func (r *PackageInstallStatusReconciler) reconcile(clusterClient client.Client,

var errorList []error

patchHelper, err := clusterapipatchutil.NewHelper(clusterBootstrap, r.Client)
if err != nil {
errorList = append(errorList, errors.Wrap(err, "error patching ClusterBootstrapStatus"))
retErr = kerrors.NewAggregate(errorList)
}

defer func() {
patchHelper, err := clusterapipatchutil.NewHelper(clusterBootstrap, r.Client)
if err != nil {
errorList = append(errorList, errors.Wrap(err, "error patching ClusterBootstrapStatus"))
retErr = kerrors.NewAggregate(errorList)
}
if err := patchHelper.Patch(r.ctx, clusterBootstrap); err != nil {
errorList = append(errorList, errors.Wrap(err, "error patching ClusterBootstrapStatus"))
retErr = kerrors.NewAggregate(errorList)
Expand Down

0 comments on commit 8fc4a78

Please # to comment.