fix(test): pin Havana repeated-midnight cases to a past transition

tzdata 2026f cancelled Cuba's November 2026 DST fallback, so on hosts
with current tzdata (macOS) 2026-11-01 has no repeated midnight:
TestNextWeeklyRenewal_RepeatedMidnight failed and the subscription
calendar cases passed without exercising the repeated midnight.

Move both to 2020-11-01, a Sunday fallback on the 1st that every tzdata
version agrees on. The weekly case still catches a 168-hour advance.
This commit is contained in:
Sanaei
2026-11-06 18:47:14 +01:00
parent 510bee2f30
commit e535df0374
2 changed files with 8 additions and 5 deletions
@@ -10,10 +10,12 @@ func TestNextWeeklyRenewal_RepeatedMidnight(t *testing.T) {
if err != nil {
t.Fatal(err)
}
// A past transition: tzdata 2026f cancelled Cuba's November 2026 fallback,
// so a future one makes the result depend on the host's tzdata version.
for _, tt := range []struct{ expiry, want string }{
{"2026-10-25T00:00:00-04:00", "2026-11-01T00:00:00-04:00"},
{"2026-11-01T00:00:00-04:00", "2026-11-08T00:00:00-05:00"},
{"2026-11-01T00:00:00-05:00", "2026-11-08T00:00:00-05:00"},
{"2020-10-25T00:00:00-04:00", "2020-11-01T00:00:00-04:00"},
{"2020-11-01T00:00:00-04:00", "2020-11-08T00:00:00-05:00"},
{"2020-11-01T00:00:00-05:00", "2020-11-08T00:00:00-05:00"},
} {
from, err := time.Parse(time.RFC3339, tt.expiry)
if err != nil {