Skip to content

Commit

Permalink
fix memory access
Browse files Browse the repository at this point in the history
  • Loading branch information
bplessis-swi committed Oct 4, 2023
1 parent 6860178 commit 9a165f1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/lookable/asg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ func TestLookupASG(t *testing.T) {
/* Single instance result */
{
client: func(t *testing.T) (ASGAPI,EC2API) {

return &MockASGAPI{
DescribeAutoScalingGroupsMethod: func(ctx context.Context, params *autoscaling.DescribeAutoScalingGroupsInput, optFns...func(*autoscaling.Options)) (*autoscaling.DescribeAutoScalingGroupsOutput, error) {
if params.Filters == nil {
Expand Down Expand Up @@ -70,7 +69,7 @@ func TestLookupASG(t *testing.T) {
t.Fatal("expect InstancesIds to not be nil")
}

instances := make([]ec2types.Instance, len(params.InstanceIds))
instances := make([]ec2types.Instance, 0, len(params.InstanceIds))
for _, id := range params.InstanceIds {
ipv4Address := "10.0.0." + id[len(id)-1:]
ipv6Address := "f00:ba5:10:0:0:" + id[len(id)-1:]
Expand Down

0 comments on commit 9a165f1

Please sign in to comment.