Skip to content

Commit

Permalink
Update rollout_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
keroxp committed Jun 20, 2024
1 parent a388951 commit 0ce2431
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions rollout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,28 @@ func TestCage_RollOut_FARGATE(t *testing.T) {
assert.Equal(t, v, mctx.RunningTaskSize())
}
})
t.Run("multiple load balancers", func(t *testing.T) {
log.Info("====")
envars := test.DefaultEnvars()
lb := envars.ServiceDefinitionInput.LoadBalancers[0]
envars.ServiceDefinitionInput.LoadBalancers = []ecstypes.LoadBalancer{lb, lb}
ctrl := gomock.NewController(t)

mctx, ecsMock, albMock, ec2Mock := test.Setup(ctrl, envars, 1, "FARGATE")
cagecli := cage.NewCage(&cage.Input{
Env: envars,
ECS: ecsMock,
ALB: albMock,
EC2: ec2Mock,
Time: test.NewFakeTime(),
})
ctx := context.Background()
result, err := cagecli.RollOut(ctx, &cage.RollOutInput{})
assert.NoError(t, err)
assert.False(t, result.ServiceIntact)
assert.Equal(t, 1, mctx.ActiveServiceSize())
assert.Equal(t, 1, mctx.RunningTaskSize())
})
t.Run("wait until canary task is registered to target group", func(t *testing.T) {
envars := test.DefaultEnvars()
ctrl := gomock.NewController(t)
Expand Down

0 comments on commit 0ce2431

Please sign in to comment.