Booked-event test: pin the clock inside the hour that failed
fa29a1d's fixed clock was 13:00 UTC, where the stale-host bug does not
show, so its 'ci-failure' case passed without the fix. Swept every hour
from 20 to 30 September with time.Now() replaced: the old test failed at
14:17 UTC on every date and nowhere else. The case is now 14:17 UTC on
24 September, and fails ('slot taken') without the reread.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+7
−4
internal/calendartest/booking_settings_test.go+7 −4
diff --git a/internal/calendartest/booking_settings_test.go b/internal/calendartest/booking_settings_test.go| index 4525472..5073841 100644 |
| --- a/internal/calendartest/booking_settings_test.go |
| +++ b/internal/calendartest/booking_settings_test.go |
| @@ -116,14 +116,17 @@ func TestATakenHandleIsRefusedOnSettings(t *testing.T) { |
| // works — and still works after the host changes their profile zone, |
| // because the hidden tz is the event's own (B25). |
| func TestABookedEventsFormLocksItsTimeButSavesItsTitle(t *testing.T) { |
| - // Keep this scenario independent of the machine's wall clock. In |
| - // particular, exercise both sides of the Dublin DST boundary as well as |
| - // the date on which this test previously failed in CI. |
| + // Keep this scenario independent of the machine's wall clock. With |
| + // time.Now() it failed only when run between 14:00 and 15:00 UTC in |
| + // summer time, on any date (a sweep of every hour, 20-30 September, |
| + // failed at 14:17 and nowhere else): the stale-host bug the reread below |
| + // fixes. The first case is that hour, and fails without the reread; |
| + // the other two are either side of Dublin's DST boundaries. |
| for _, now := range []struct { |
| name string |
| now time.Time |
| }{ |
| - {"ci-failure-2026-09-24", time.Date(2026, time.September, 24, 13, 0, 0, 0, time.UTC)}, |
| + {"ci-failure-2026-09-24-1417Z", time.Date(2026, time.September, 24, 14, 17, 0, 0, time.UTC)}, |
| {"dublin-dst-start", time.Date(2026, time.March, 29, 13, 0, 0, 0, time.UTC)}, |
| {"dublin-dst-end", time.Date(2026, time.October, 25, 13, 0, 0, 0, time.UTC)}, |
| } { |