Skip to content

Commit

Permalink
rename test and cleanup un-need logic check
Browse files Browse the repository at this point in the history
Signed-off-by: Zach Aller <[email protected]>
  • Loading branch information
zachaller committed Jun 12, 2024
1 parent 0b32bc0 commit 68c6f6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rollout/trafficrouting.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func (c *rolloutContext) reconcileTrafficRouting() error {
// At the end of the rollout we need to verify the weight is correct, and return an error if not because we don't want the rest of the
// reconcile process to continue. We don't need to do this if we are in the middle of the rollout because the rest of the reconcile
// process won't scale down the old replicasets yet due to being in the middle of some steps.
if *weightVerified == false && desiredWeight == weightutil.MaxTrafficWeight(c.rollout) && len(c.rollout.Spec.Strategy.Canary.Steps) >= int(*c.rollout.Status.CurrentStepIndex) {
if desiredWeight == weightutil.MaxTrafficWeight(c.rollout) && len(c.rollout.Spec.Strategy.Canary.Steps) >= int(*c.rollout.Status.CurrentStepIndex) {
return fmt.Errorf("end of rollout, desired weight %d not yet verified", desiredWeight)
}
}
Expand Down
2 changes: 1 addition & 1 deletion rollout/trafficrouting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func TestReconcileTrafficRoutingVerifyWeightFalse(t *testing.T) {
assert.True(t, enqueued)
}

func TestReconcileTrafficRoutingVerifyWeightDesiredWeight100(t *testing.T) {
func TestReconcileTrafficRoutingVerifyWeightEndOfRollout(t *testing.T) {
f := newFixture(t)
defer f.Close()

Expand Down

0 comments on commit 68c6f6f

Please sign in to comment.