Skip to content

Commit f8c5ca0

Browse files
committed
Test case for cron-expression: "at 02:20 on sunday"
Signed-off-by: Péter Bakonyi-Kárpáti <pbk@vivid-planet.com>
1 parent af43901 commit f8c5ca0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/core/timer_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ func TestWaitForCron(t *testing.T) {
2020
{"current minute but seconds in", "1 * * * *", "2018-10-10T10:01:10Z", 59*time.Minute + 50*time.Second, nil}, // this line tests that we use the current minute, and not wait for "-10"
2121
{"midnight next day", "0 0 * * *", "2021-11-30T10:00:00Z", 14 * time.Hour, nil},
2222
{"first day next month in next year", "0 0 1 * *", "2020-12-30T10:00:00Z", 14*time.Hour + 24*time.Hour, nil}, // this line tests that we can handle rolling month correctly
23+
{"at 02:20 on sunday", "20 2 * * 0", "2025-05-21T10:00:00Z", 16*time.Hour + 20*time.Minute + 3*24*time.Hour, nil},
2324
}
2425
for _, tt := range tests {
2526
t.Run(tt.name, func(t *testing.T) {

0 commit comments

Comments
 (0)