diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-05 22:21:43 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-05 22:21:43 +0200 |
| commit | b92fd0618d81b7a7cc53059e601b86a76d7ed2a2 (patch) | |
| tree | fcfb6cdadae74f3ccab4a981f24263a2708223ba /internal/tui/tui_test.go | |
| parent | 501f514b1a357d695def12e262131d9f49a6c480 (diff) | |
task 352: wire LiveTrie into TUI runtime bindings
Diffstat (limited to 'internal/tui/tui_test.go')
| -rw-r--r-- | internal/tui/tui_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/tui/tui_test.go b/internal/tui/tui_test.go index 610461d..c801b24 100644 --- a/internal/tui/tui_test.go +++ b/internal/tui/tui_test.go @@ -3,6 +3,7 @@ package tui import ( "context" "errors" + coreflamegraph "ior/internal/flamegraph" "ior/internal/probemanager" "ior/internal/statsengine" dashboardui "ior/internal/tui/dashboard" @@ -220,6 +221,20 @@ func TestDashboardRefreshPicksLateBoundSource(t *testing.T) { } } +func TestRuntimeBindingsStoreAndExposeLiveTrie(t *testing.T) { + runtime := newRuntimeBindings() + trie := coreflamegraph.NewLiveTrie([]string{"comm", "path"}, "count") + runtime.SetLiveTrie(trie) + if got := runtime.liveTrie(); got != trie { + t.Fatalf("expected live trie to be stored and returned") + } + + runtime.SetLiveTrie(nil) + if got := runtime.liveTrie(); got != nil { + t.Fatalf("expected live trie to clear on nil assignment") + } +} + func TestProbeToggledMsgResetsDashboardStatsSource(t *testing.T) { src := &fakeResettableDashboardSource{snap: &statsengine.Snapshot{TotalSyscalls: 99}} |
