package stacks import ( "io" "log" "testing" "gitea.dooplex.hu/admin/felhom-controller/internal/config" ) // R-575: the soft overcommit warning leaves memoryVerdict as a bundle KEY, never as Hungarian text, so // the API can render it in the reader's language. PATH is emptied so the memory reading can never fall // through to `docker info` on the host running the test. func TestR575_OvercommitWarningIsAKey(t *testing.T) { t.Setenv("PATH", "") m := &Manager{cfg: &config.Config{}, logger: log.New(io.Discard, "", 0), stacks: map[string]*Stack{}} refusal, warning := m.memoryVerdict(0, 1<<30, 0, 0) // a limit no machine has: overcommit, no hard block if refusal != nil { t.Fatalf("no request -> no refusal, got %v", refusal) } if warning != KeyMemoryOvercommitWarning { t.Fatalf("warning = %q, want the bundle key %q", warning, KeyMemoryOvercommitWarning) } }