Skip to content

Commit

Permalink
Add test for where we do not need to verify weight and its already set
Browse files Browse the repository at this point in the history
Signed-off-by: zachaller <[email protected]>
  • Loading branch information
zachaller committed Apr 21, 2022
1 parent 8eae288 commit cd5d7c3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions rollout/trafficrouting/alb/alb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,18 @@ func TestVerifyWeight(t *testing.T) {
assert.False(t, *weightVerified)
}

// VeryifyWeight that we do not need to verify weight and status.ALB is already set
{
var status v1alpha1.RolloutStatus
r, _ := newFakeReconciler(&status)
r.cfg.Rollout.Status.ALB = &v1alpha1.ALBStatus{}
r.cfg.Rollout.Status.CurrentStepIndex = nil
r.cfg.Rollout.Spec.Strategy.Canary.Steps = nil
weightVerified, err := r.VerifyWeight(10)
assert.NoError(t, err)
assert.Nil(t, weightVerified)
}

// LoadBalancer found, not at weight
{
var status v1alpha1.RolloutStatus
Expand Down

0 comments on commit cd5d7c3

Please sign in to comment.