Files
felhom-controller/controller/internal/web/r518_backup_downtime_copy_test.go
T
admin 80e6ad8c47
gates / gates (push) Successful in 26s
controller v0.267.0: tests off DooPlex's Docker, cut-off copies refused, two pages true
R-650: internal/dockerexec — every docker exec routed through it; under
go test a real docker is refused (opt-in FELHOM_TEST_REAL_DOCKER=1; a stub
under the temp dir is allowed). api/stacks/web tests run under a silent
stub (TestMain). TestR650_NoBareDockerExec pins it repo-wide.
R-640: a dump without its engine's completion marker is refused before
the first mutation (unit + off-site restore) and again before any load.
R-499: the Tier-2 page's system-disk sentence has four true branches.
R-518: the backup button states the measured ~8 min stop.
R-626: measured on 9202, not reproduced.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
2026-09-23 20:25:28 +02:00

39 lines
1.3 KiB
Go

package web
import (
"strings"
"testing"
)
// R-518 — the whole-system backup button promised a short stop; measured 2026-09-14 on a 12-app box,
// every app was down for about 7 m 45 s. The copy now states that measurement, in both languages, on
// the page and in the confirm dialog. ASCII fragments only (ui-hungarian rule), each with a control.
func TestR518_BackupButtonStatesTheMeasuredDowntime(t *testing.T) {
s := i18nTestServer(t)
var c i18nCase
for _, x := range i18nCases() {
if x.name == "backups_full" {
c = x
}
}
if c.name == "" {
t.Fatal("no backups_full case — the test would pass by looking at nothing")
}
for _, lang := range []string{"hu", "en"} {
body := renderI18nCase(t, s, lang, c)
measured, vague := "8 perc", "" // „kb. 8 perc"
if lang == "en" {
measured, vague = "about 8 minutes", "usually for a few minutes"
}
if n := strings.Count(body, measured); n < 2 {
t.Errorf("%s: the measured downtime appears %d times, want it on the page AND in the confirm", lang, n)
}
if lang == "en" && strings.Contains(body, vague) {
t.Errorf("en: the old vague promise %q is still on the page", vague)
}
if lang == "hu" && strings.Contains(body, "ltalában néhány perc, nagyobb") {
t.Errorf("hu: the old vague promise is still on the page")
}
}
}