Skip to content

Commit

Permalink
Added handling for another special case having current date March 31
Browse files Browse the repository at this point in the history
  • Loading branch information
rishi-salunkhe-mettle committed Aug 2, 2024
1 parent 7496e45 commit c01b2af
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions endpointmanager/pkg/jsonexport/jsonexport_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ func Test_getHistory(t *testing.T) {
now = now.AddDate(0, 0, -1)
}

// Subtract the day again by 2 so that the oldDate is Feb 28 if the current date is March 31.
if now.Month() == time.March {
now = now.AddDate(0, 0, -2)
}

oldDate := now.AddDate(0, -1, 0).Format("2006-01-02 15:04:05.000000000")

updateEndpointInfoHistoryDate := `
Expand Down

0 comments on commit c01b2af

Please sign in to comment.