diff --git a/pkg/snapshot/snapshotter/snapshotter.go b/pkg/snapshot/snapshotter/snapshotter.go index 8a2846749..ccfb9dece 100644 --- a/pkg/snapshot/snapshotter/snapshotter.go +++ b/pkg/snapshot/snapshotter/snapshotter.go @@ -793,11 +793,11 @@ func (ssr *Snapshotter) GetFullSnapshotMaxTimeWindow(fullSnapScheduleSpec string return defaultFullSnapMaxTimeWindow } - if schedule[dayOfMonth] == "*" && schedule[dayOfWeek] == "*" && !strings.Contains(schedule[hour], "/") { - return defaultFullSnapMaxTimeWindow - } else if schedule[dayOfWeek] != "*" { + if schedule[dayOfWeek] != "*" { return defaultFullSnapMaxTimeWindow * 7 - } else if schedule[dayOfMonth] == "*" && schedule[dayOfWeek] == "*" && strings.Contains(schedule[hour], "/") { + } + + if schedule[dayOfMonth] == "*" && schedule[dayOfWeek] == "*" && strings.Contains(schedule[hour], "/") { if timeWindow, err := strconv.ParseFloat(schedule[hour][strings.Index(schedule[hour], "/")+1:], 64); err == nil { return timeWindow } diff --git a/pkg/snapshot/snapshotter/snapshotter_test.go b/pkg/snapshot/snapshotter/snapshotter_test.go index 2c3aa771d..d19186b32 100644 --- a/pkg/snapshot/snapshotter/snapshotter_test.go +++ b/pkg/snapshot/snapshotter/snapshotter_test.go @@ -573,7 +573,7 @@ var _ = Describe("Snapshotter", func() { }) }) - Describe("Scenarios to take full-snapshot during startup of backup-restore", func() { + FDescribe("Scenarios to take full-snapshot during startup of backup-restore", func() { var ( ssr *Snapshotter currentMin int @@ -696,7 +696,7 @@ var _ = Describe("Snapshotter", func() { }) }) - Describe("Scenarios to get maximum time window for full snapshot", func() { + FDescribe("Scenarios to get maximum time window for full snapshot", func() { var ( ssr *Snapshotter currentMin int