Skip to content

Commit

Permalink
ALB tests fix
Browse files Browse the repository at this point in the history
Signed-off-by: Danil Smirnov <[email protected]>
  • Loading branch information
danil-smirnov committed Feb 21, 2023
1 parent 1fe56c0 commit 599469f
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions rollout/trafficrouting/alb/alb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,14 +549,14 @@ func TestVerifyWeight(t *testing.T) {
r, fakeClient := newFakeReconciler(&status)
fakeClient.loadBalancer = &elbv2types.LoadBalancer{
LoadBalancerName: pointer.StringPtr("lb-abc123-name"),
LoadBalancerArn: pointer.StringPtr("lb-abc123-arn"),
LoadBalancerArn: pointer.StringPtr("lb-abc123-arn/456/789"),
DNSName: pointer.StringPtr("verify-weight-test-abc-123.us-west-2.elb.amazonaws.com"),
}
fakeClient.targetGroups = []aws.TargetGroupMeta{
{
TargetGroup: elbv2types.TargetGroup{
TargetGroupName: pointer.StringPtr("canary-tg-abc123-name"),
TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn"),
TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn/456"),
},
Weight: pointer.Int32Ptr(11),
Tags: map[string]string{
Expand All @@ -566,7 +566,7 @@ func TestVerifyWeight(t *testing.T) {
{
TargetGroup: elbv2types.TargetGroup{
TargetGroupName: pointer.StringPtr("stable-tg-abc123-name"),
TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn"),
TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn/456"),
},
Weight: pointer.Int32Ptr(89),
Tags: map[string]string{
Expand All @@ -587,14 +587,14 @@ func TestVerifyWeight(t *testing.T) {
r, fakeClient := newFakeReconciler(&status)
fakeClient.loadBalancer = &elbv2types.LoadBalancer{
LoadBalancerName: pointer.StringPtr("lb-abc123-name"),
LoadBalancerArn: pointer.StringPtr("lb-abc123-arn"),
LoadBalancerArn: pointer.StringPtr("lb-abc123-arn/456/789"),
DNSName: pointer.StringPtr("verify-weight-test-abc-123.us-west-2.elb.amazonaws.com"),
}
fakeClient.targetGroups = []aws.TargetGroupMeta{
{
TargetGroup: elbv2types.TargetGroup{
TargetGroupName: pointer.StringPtr("canary-tg-abc123-name"),
TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn"),
TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn/456"),
},
Weight: pointer.Int32Ptr(10),
Tags: map[string]string{
Expand All @@ -604,7 +604,7 @@ func TestVerifyWeight(t *testing.T) {
{
TargetGroup: elbv2types.TargetGroup{
TargetGroupName: pointer.StringPtr("stable-tg-abc123-name"),
TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn"),
TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn/456"),
},
Weight: pointer.Int32Ptr(11),
Tags: map[string]string{
Expand Down Expand Up @@ -725,14 +725,14 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) {
r, fakeClient := newFakeReconciler(&status)
fakeClient.loadBalancer = &elbv2types.LoadBalancer{
LoadBalancerName: pointer.StringPtr("lb-abc123-name"),
LoadBalancerArn: pointer.StringPtr("lb-abc123-arn"),
LoadBalancerArn: pointer.StringPtr("lb-abc123-arn/456/789"),
DNSName: pointer.StringPtr("verify-weight-test-abc-123.us-west-2.elb.amazonaws.com"),
}
fakeClient.targetGroups = []aws.TargetGroupMeta{
{
TargetGroup: elbv2types.TargetGroup{
TargetGroupName: pointer.StringPtr("canary-tg-abc123-name"),
TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn"),
TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn/456"),
},
Weight: pointer.Int32Ptr(10),
Tags: map[string]string{
Expand All @@ -742,7 +742,7 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) {
{
TargetGroup: elbv2types.TargetGroup{
TargetGroupName: pointer.StringPtr("stable-tg-abc123-name"),
TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn"),
TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn/456"),
},
Weight: pointer.Int32Ptr(90),
Tags: map[string]string{
Expand All @@ -763,14 +763,14 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) {
r, fakeClient := newFakeReconciler(&status)
fakeClient.loadBalancer = &elbv2types.LoadBalancer{
LoadBalancerName: pointer.StringPtr("lb-abc123-name"),
LoadBalancerArn: pointer.StringPtr("lb-abc123-arn"),
LoadBalancerArn: pointer.StringPtr("lb-abc123-arn/456/789"),
DNSName: pointer.StringPtr("verify-weight-test-abc-123.us-west-2.elb.amazonaws.com"),
}
fakeClient.targetGroups = []aws.TargetGroupMeta{
{
TargetGroup: elbv2types.TargetGroup{
TargetGroupName: pointer.StringPtr("canary-tg-abc123-name"),
TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn"),
TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn/456"),
},
Weight: pointer.Int32Ptr(10),
Tags: map[string]string{
Expand All @@ -780,7 +780,7 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) {
{
TargetGroup: elbv2types.TargetGroup{
TargetGroupName: pointer.StringPtr("ex-svc-1-tg-abc123-name"),
TargetGroupArn: pointer.StringPtr("ex-svc-1-tg-abc123-arn"),
TargetGroupArn: pointer.StringPtr("ex-svc-1-tg-abc123-arn/456"),
},
Weight: pointer.Int32Ptr(100),
Tags: map[string]string{
Expand All @@ -790,7 +790,7 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) {
{
TargetGroup: elbv2types.TargetGroup{
TargetGroupName: pointer.StringPtr("ex-svc-2-tg-abc123-name"),
TargetGroupArn: pointer.StringPtr("ex-svc-2-tg-abc123-arn"),
TargetGroupArn: pointer.StringPtr("ex-svc-2-tg-abc123-arn/456"),
},
Weight: pointer.Int32Ptr(100),
Tags: map[string]string{
Expand All @@ -800,7 +800,7 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) {
{
TargetGroup: elbv2types.TargetGroup{
TargetGroupName: pointer.StringPtr("stable-tg-abc123-name"),
TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn"),
TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn/456"),
},
Weight: pointer.Int32Ptr(85),
Tags: map[string]string{
Expand All @@ -821,14 +821,14 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) {
r, fakeClient := newFakeReconciler(&status)
fakeClient.loadBalancer = &elbv2types.LoadBalancer{
LoadBalancerName: pointer.StringPtr("lb-abc123-name"),
LoadBalancerArn: pointer.StringPtr("lb-abc123-arn"),
LoadBalancerArn: pointer.StringPtr("lb-abc123-arn/456/789"),
DNSName: pointer.StringPtr("verify-weight-test-abc-123.us-west-2.elb.amazonaws.com"),
}
fakeClient.targetGroups = []aws.TargetGroupMeta{
{
TargetGroup: elbv2types.TargetGroup{
TargetGroupName: pointer.StringPtr("canary-tg-abc123-name"),
TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn"),
TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn/456"),
},
Weight: pointer.Int32Ptr(10),
Tags: map[string]string{
Expand All @@ -838,7 +838,7 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) {
{
TargetGroup: elbv2types.TargetGroup{
TargetGroupName: pointer.StringPtr("ex-svc-1-tg-abc123-name"),
TargetGroupArn: pointer.StringPtr("ex-svc-1-tg-abc123-arn"),
TargetGroupArn: pointer.StringPtr("ex-svc-1-tg-abc123-arn/456"),
},
Weight: &weightDestinations[0].Weight,
Tags: map[string]string{
Expand All @@ -848,7 +848,7 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) {
{
TargetGroup: elbv2types.TargetGroup{
TargetGroupName: pointer.StringPtr("ex-svc-2-tg-abc123-name"),
TargetGroupArn: pointer.StringPtr("ex-svc-2-tg-abc123-arn"),
TargetGroupArn: pointer.StringPtr("ex-svc-2-tg-abc123-arn/456"),
},
Weight: &weightDestinations[1].Weight,
Tags: map[string]string{
Expand All @@ -858,7 +858,7 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) {
{
TargetGroup: elbv2types.TargetGroup{
TargetGroupName: pointer.StringPtr("stable-tg-abc123-name"),
TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn"),
TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn/456"),
},
Weight: pointer.Int32Ptr(85),
Tags: map[string]string{
Expand Down

0 comments on commit 599469f

Please sign in to comment.