v0.279.0: after_install (decision 45), known default logins on the page, Part D empty-backup alarm, night chain (R-705), R-706
gates / gates (push) Successful in 27s
gates / gates (push) Successful in 27s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package web
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"gitea.dooplex.hu/admin/felhom-controller/internal/backup"
|
||||
)
|
||||
|
||||
// Part D (v0.279.0) — the household sees the sentence on the REAL backup page (ServeHTTP → template), in
|
||||
// Hungarian by default, and the page is silent when nothing is flagged (negative control).
|
||||
// COMPANION RED-PROOF: drop `data["HollowCopyLines"]` from backupsAppsHandler → the sentence is absent.
|
||||
func TestPartD_TheBackupPageSaysARunningAppHasNoData(t *testing.T) {
|
||||
s := newDashboardServer(t, time.Time{})
|
||||
if s.backupMgr == nil {
|
||||
t.Fatal("fixture has no backup manager")
|
||||
}
|
||||
quiet := getPage(t, s, "/backups/apps")
|
||||
if quiet.Code != 200 || strings.Contains(quiet.Body.String(), "nem tartalmaz adatot") {
|
||||
t.Fatalf("with nothing flagged the page must be silent (code %d)", quiet.Code)
|
||||
}
|
||||
s.backupMgr.FlagHollowCopyForTest("cloudapp", backup.HollowTierOffsite)
|
||||
rec := getPage(t, s, "/backups/apps")
|
||||
body := rec.Body.String()
|
||||
if rec.Code != 200 || !strings.Contains(body, "A(z) cloudapp fut, de a legutóbbi távoli mentése nem tartalmaz adatot") {
|
||||
t.Fatalf("the flagged app's sentence is not on the page (code %d)", rec.Code)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user