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 committed Jan 28, 2025
2 parents ecf2a77 + 187ba20 commit b2a16af
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 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
2 changes: 1 addition & 1 deletion pkg/skr/backupschedule/evaluateNextRun_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (suite *evaluateNextRunSuite) TestWhenNextRunTimeIsNotDueYet() {
delay := result.RequeueAfter
suite.Nil(err)
suite.NotNil(delay)
suite.Greater(delay, time.Duration(int64(0.95 * float64(offset))))
suite.Greater(delay, time.Duration(int64(0.95*float64(offset))))
suite.LessOrEqual(delay, offset)
}

Expand Down

0 comments on commit b2a16af

Please sign in to comment.