Skip to content

Commit

Permalink
Merge branch 'main' into schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
ravi-shankar-sap authored Jan 28, 2025
2 parents ecf2a77 + 187ba20 commit 53950dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
6 changes: 0 additions & 6 deletions .checkmarx/config.yml

This file was deleted.

11 changes: 8 additions & 3 deletions pkg/kcp/provider/aws/mock/routeTablesStore.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,17 @@ func (s *routeTablesStore) DeleteRoute(ctx context.Context, routeTableId, destin
}

func (s *routeTablesStore) GetRouteCount(ctx context.Context, vpcId, vpcPeeringConnectionId, destinationCidrBlock string) int {
tables, _ := s.DescribeRouteTables(ctx, vpcId)
tables, err := s.DescribeRouteTables(ctx, vpcId)

if err != nil {
return -1
}

cnt := 0
for _, t := range tables {
for _, r := range t.Routes {
if *r.VpcPeeringConnectionId == vpcPeeringConnectionId &&
*r.DestinationCidrBlock == destinationCidrBlock {
if ptr.Deref(r.VpcPeeringConnectionId, "") == vpcPeeringConnectionId &&
ptr.Deref(r.DestinationCidrBlock, "") == destinationCidrBlock {
cnt++
}
}
Expand Down

0 comments on commit 53950dc

Please sign in to comment.