fix(test): use relative timestamp in incident restart persistence test

TestUnifiedProviderIncidentRecoveryConfirmationSurvivesRestart hardcoded
observedAt as 2026-07-24, but the restore path drops persisted alerts
older than 24h, so the test began failing once the calendar moved past
the fixed date. Use a recent relative timestamp instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
courtmanr@gmail.com 2026-07-26 12:04:30 +01:00
parent bbd333631c
commit c9600eace1

View file

@ -66,7 +66,8 @@ func TestUnifiedProviderIncidentConfirmationRecoveryAndStableIdentity(t *testing
func TestUnifiedProviderIncidentRecoveryConfirmationSurvivesRestart(t *testing.T) {
dataDir := t.TempDir()
cfg := unifiedEvalBaseConfig()
observedAt := time.Date(2026, 7, 24, 10, 0, 0, 0, time.UTC)
// Restore drops alerts older than 24h, so the incident must start recently.
observedAt := time.Now().UTC().Add(-time.Hour).Truncate(time.Second)
resource := confirmedProviderIncidentResource(observedAt)
first := NewManagerWithDataDir(dataDir)