package api import "testing" // E-2 — the absent-backup-target signal needs BOTH registers, not one. // // Phase 0 of E-2 established that an absent backup target has no prompt signal today: the drive-gate // path stops apps and logs, but emits nothing, and the tier's own failure only lands at its next due // cycle (up to ~24 h on the daily local tier). `backup_target_absent` is that missing signal. // // A new event type is a PAIR, and each half fails differently: // - missing from allowedEventTypes → POST /event returns 400 and the event VANISHES (R-97a); // - missing from customerMessages → it is delivered, but the customer gets the controller's raw // English operator string instead of Hungarian. // // The second failure is the quiet one — delivery "works", so nothing looks broken. Both are pinned // here, in the same test, because fixing one and not the other is the realistic mistake. func TestBackupTargetEventTypesAreAllowlisted(t *testing.T) { for _, et := range []string{"backup_target_absent", "backup_target_restored"} { if !allowedEventTypes[et] { t.Fatalf("%s must be in allowedEventTypes, or POST /event 400s and the absent backup "+ "target goes silent until the tier misses its deadline", et) } } }