hub(D62): restore_copy_deleted accepted and operator-only — the household's restore-copy delete is recorded (test red first)
gates / gates (push) Successful in 1m48s

This commit is contained in:
admin committed 2026-10-29 08:23:29 +01:00
1 parent 7799ef5f54
commit 19afefab55
4 files changed
+33 -1

No files matched your search

@@ -0,0 +1,19 @@
package api
import (
"testing"
"gitea.dooplex.hu/admin/felhom-hub/internal/notify"
)
// D62 (operator 2026-10-29): the household's „Törlés most" on a restore copy sends restore_copy_deleted (who, app,
// date, size). It is accepted from a box (an unlisted type is a 400 and the record is lost) AND operator-only — both
// registers, same commit. RED-PROOF: seen failing before either entry existed.
func TestD62_RestoreCopyDeletedIsAllowedAndOperatorOnly(t *testing.T) {
if !allowedEventTypes["restore_copy_deleted"] {
t.Errorf("restore_copy_deleted is not in allowedEventTypes — POST /event would 400 and the record would be lost")
}
if !notify.IsOperatorOnly("restore_copy_deleted") {
t.Errorf("restore_copy_deleted is not operator-only")
}
}
+4
View File
@@ -2432,6 +2432,10 @@ var allowedEventTypes = map[string]bool{
"app_unexplained_upload_cleared": true,
"app_unexplained_cpu": true,
"app_unexplained_cpu_cleared": true,
// D62 (operator 2026-10-29; controller „Törlés most" on a restore copy): the household deleted a restore copy by hand
// — who, app, the restore's date, size. Operator-only (notify.operatorOnlyEvents) — registered in BOTH in the same
// commit.
"restore_copy_deleted": true,
// Special
"test": true,
}