FileBrowser is published only after its default login is checked (R-1126); the memory refusal says what to do (R-1125)
R-1126 (D11 = A): FileBrowser starts off traefik-public, on its own network felhom-filebrowser; the controller joins it there, checks this run's default login, and only then puts FileBrowser on traefik-public (files.<domain> served). FileBrowser's own admin-password setting re-applies at every start (1.5.6 cmd/user.go:50-57, measured on 9202), so it cannot carry the box's password without overwriting the household's own. Tests red-proved. R-1125 (D10 = A): err.stacks.not_enough_memory says the memory is held by the installed apps and to remove one or use a machine with more memory (HU + EN, reworded on purpose). TestR1125_NotEnoughMemorySaysWhatToDo, red-proved. Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -133,8 +133,10 @@ func TestR553_MemoryRefusalIsWrappedWithItsKind(t *testing.T) {
|
||||
t.Error("the memory refusal does not carry ErrNotEnoughMemory — the API would answer 500 " +
|
||||
"for a refusal the customer can act on")
|
||||
}
|
||||
const wantHU = "Nincs elég memória az alkalmazás telepítéséhez. Szükséges: 900 MB, Elérhető: 100 MB " +
|
||||
"(összesen: 2048 MB, ebből 1436 MB használt, 512 MB rendszer számára fenntartva)"
|
||||
// R-1125 (v0.327.0): reworded — the memory is held by the installed apps, and the sentence says what to do.
|
||||
const wantHU = "Nincs elég memória ehhez az alkalmazáshoz a már telepítettek mellett: kell 900 MB, szabad 100 MB " +
|
||||
"(összesen 2048 MB, ebből 1436 MB-ot a telepített alkalmazások foglalnak, 512 MB a rendszeré). " +
|
||||
"Távolíts el egy alkalmazást, amelyre nincs szükséged, vagy használj több memóriájú gépet."
|
||||
if e.Error() != wantHU {
|
||||
t.Errorf("the Hungarian refusal moved:\n got %q\nwant %q", e.Error(), wantHU)
|
||||
}
|
||||
@@ -154,3 +156,24 @@ func TestR553_MemoryRefusalIsWrappedWithItsKind(t *testing.T) {
|
||||
t.Error("the memory refusal is back to a bare error: its kind is gone (R-553)")
|
||||
}
|
||||
}
|
||||
|
||||
// R-1125 (operator decision D10 = A): the install check counts the apps' real memory, so a household meets this refusal
|
||||
// more often. It must say, in both languages, that the memory is held by the apps already installed and what to do.
|
||||
// RED-PROOF (2026-10-17): the old sentence („Szükséges … Elérhető …", no advice) fails every check below.
|
||||
func TestR1125_NotEnoughMemorySaysWhatToDo(t *testing.T) {
|
||||
e := util.MsgErrorf(ErrNotEnoughMemory, "err.stacks.not_enough_memory", 600, 200, 3712, 3310, 384)
|
||||
for _, c := range []struct {
|
||||
lang string
|
||||
want []string
|
||||
}{
|
||||
{"hu", []string{"a már telepítettek mellett", "kell 600 MB", "szabad 200 MB", "Távolíts el egy alkalmazást", "több memóriájú gépet"}},
|
||||
{"en", []string{"next to the apps already installed", "needs 600 MB", "200 MB is free", "Remove an app", "a machine with more memory"}},
|
||||
} {
|
||||
got := util.ErrText(c.lang, e)
|
||||
for _, w := range c.want {
|
||||
if !strings.Contains(got, w) {
|
||||
t.Errorf("%s: the refusal does not say %q: %q", c.lang, w, got)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user