Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
fix: unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie17Li committed Sep 28, 2023
1 parent 8b14d26 commit c5fdd1f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ func (r *ModuleDeploymentReconciler) Reconcile(ctx context.Context, req ctrl.Req
return ctrl.Result{}, err
}
}
if !moduleVersionChanged && isUrlChange(moduleDeployment.Spec.Template.Spec.Module, newRS.Spec.Template.Spec.Module) {
newRS.Spec.Template.Spec.Module = moduleDeployment.Spec.Template.Spec.Module
if err := r.Client.Update(ctx, newRS); err != nil {
return ctrl.Result{}, err
}
}
case moduledeploymentv1alpha1.ModuleDeploymentReleaseProgressWaitingForConfirmation:
moduleDeployment.Spec.Pause = true
if err := r.Update(ctx, moduleDeployment); err != nil {
Expand All @@ -137,12 +143,6 @@ func (r *ModuleDeploymentReconciler) Reconcile(ctx context.Context, req ctrl.Req
}
}
}
if !moduleVersionChanged && isUrlChange(moduleDeployment.Spec.Template.Spec.Module, newRS.Spec.Template.Spec.Module) {
newRS.Spec.Template.Spec.Module = moduleDeployment.Spec.Template.Spec.Module
if err := r.Client.Update(ctx, newRS); err != nil {
return ctrl.Result{}, err
}
}

// update moduleDeployment owner reference
err = r.updateOwnerReference(ctx, moduleDeployment)
Expand Down

0 comments on commit c5fdd1f

Please sign in to comment.