feat(GODT-2715): Add Unitary test for configStatus event.

This commit is contained in:
Romain LE JEUNE
2023-06-29 13:11:42 +02:00
committed by Romain Le Jeune
parent f5af2afce5
commit 1f79e3b0a7
7 changed files with 512 additions and 1 deletions

View File

@ -45,6 +45,9 @@ func (*ConfigProgressBuilder) New(data *ConfigurationStatusData) ConfigProgressD
}
func numberOfDay(now, prev time.Time) int {
if now.IsZero() || prev.IsZero() {
return 0
}
if now.Year() > prev.Year() {
if now.YearDay() > prev.YearDay() {
return 365 + (now.YearDay() - prev.YearDay())