0c702f834a
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
30 lines
1.1 KiB
Go
30 lines
1.1 KiB
Go
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)
|
|
}
|
|
}
|