Skip to content

Commit

Permalink
ALB tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
danil-smirnov committed Feb 21, 2023
1 parent 7415b2e commit b9ae003
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions rollout/trafficrouting/alb/alb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"strings"
"testing"

elbv2types "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types"
Expand Down Expand Up @@ -455,16 +456,19 @@ func (f *fakeAWSClient) GetTargetGroupHealth(ctx context.Context, targetGroupARN
func (f *fakeAWSClient) getAlbStatus() *v1alpha1.ALBStatus {
return &v1alpha1.ALBStatus{
LoadBalancer: v1alpha1.AwsResourceRef{
Name: *f.loadBalancer.LoadBalancerName,
ARN: *f.loadBalancer.LoadBalancerArn,
Name: *f.loadBalancer.LoadBalancerName,
ARN: *f.loadBalancer.LoadBalancerArn,
FullName: strings.Join(strings.Split(*f.loadBalancer.LoadBalancerArn, "/")[2:], "/"),
},
CanaryTargetGroup: v1alpha1.AwsResourceRef{
Name: *f.targetGroups[0].TargetGroupName,
ARN: *f.targetGroups[0].TargetGroupArn,
Name: *f.targetGroups[0].TargetGroupName,
ARN: *f.targetGroups[0].TargetGroupArn,
FullName: strings.Join(strings.Split(*f.targetGroups[0].TargetGroupArn, "/")[1:], "/"),
},
StableTargetGroup: v1alpha1.AwsResourceRef{
Name: *f.targetGroups[len(f.targetGroups)-1].TargetGroupName,
ARN: *f.targetGroups[len(f.targetGroups)-1].TargetGroupArn,
Name: *f.targetGroups[len(f.targetGroups)-1].TargetGroupName,
ARN: *f.targetGroups[len(f.targetGroups)-1].TargetGroupArn,
FullName: strings.Join(strings.Split(*f.targetGroups[len(f.targetGroups)-1].TargetGroupArn, "/")[1:], "/"),
},
}
}
Expand Down

0 comments on commit b9ae003

Please sign in to comment.