summaryrefslogtreecommitdiff
path: root/internal/tui/dashboard/processes_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-01 23:45:37 +0200
committerPaul Buetow <paul@buetow.org>2026-03-01 23:45:37 +0200
commit5775246cb9c2ccfb3469addf6f5fe9a8fc198171 (patch)
tree96290d1bede538c9fd352bc3954bac1ce8ab6873 /internal/tui/dashboard/processes_test.go
parent3b4be9171b7ca13d4ff3e51d14c4e569b1a308f7 (diff)
Thread runtime config instead of global flags reads
Diffstat (limited to 'internal/tui/dashboard/processes_test.go')
-rw-r--r--internal/tui/dashboard/processes_test.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/internal/tui/dashboard/processes_test.go b/internal/tui/dashboard/processes_test.go
index 4db490d..24c1c1b 100644
--- a/internal/tui/dashboard/processes_test.go
+++ b/internal/tui/dashboard/processes_test.go
@@ -4,13 +4,10 @@ import (
"strings"
"testing"
- "ior/internal/flags"
"ior/internal/statsengine"
)
func TestRenderProcessesIncludesHeaders(t *testing.T) {
- flags.SetPidFilter(-1)
-
snap := statsengine.NewSnapshot(
nil, nil, nil,
nil, nil,
@@ -34,9 +31,6 @@ func TestRenderProcessesIncludesHeaders(t *testing.T) {
}
func TestRenderProcessesShowsSinglePIDNote(t *testing.T) {
- flags.SetPidFilter(77)
- t.Cleanup(func() { flags.SetPidFilter(-1) })
-
snap := statsengine.NewSnapshot(
nil, nil, nil,
nil, nil,
@@ -47,7 +41,7 @@ func TestRenderProcessesShowsSinglePIDNote(t *testing.T) {
statsengine.HistogramSnapshot{},
)
- out := renderProcesses(&snap, 100, 20)
+ out := renderProcessesWithOffset(&snap, 100, 20, 0, 77)
if !strings.Contains(out, "most useful with All PIDs") {
t.Fatalf("expected single-pid guidance note")
}