Skip to content

Commit

Permalink
feat(AwsVpcPeering): remote route table update strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
vandjelk committed Feb 4, 2025
1 parent f40113a commit af38a0a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/kcp/provider/aws/mock/routeTablesStore.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ func (s *routeTablesStore) DescribeRouteTables(ctx context.Context, vpcId string
s.m.Lock()
defer s.m.Unlock()

return s.describeRouteTables(vpcId)
}

func (s *routeTablesStore) describeRouteTables(vpcId string) ([]ec2types.RouteTable, error) {
filtered := pie.Filter(s.items, func(e *routeTableEntry) bool {
return *e.routeTable.VpcId == vpcId
})
Expand Down Expand Up @@ -108,7 +112,7 @@ func (s *routeTablesStore) DeleteRoute(ctx context.Context, routeTableId, destin
}

func (s *routeTablesStore) GetRouteCount(vpcId, vpcPeeringConnectionId, destinationCidrBlock string) int {
tables, err := s.DescribeRouteTables(nil, vpcId)
tables, err := s.describeRouteTables(vpcId)

if err != nil {
return -1
Expand Down

0 comments on commit af38a0a

Please sign in to comment.