From acb12fea95a1fca07e83181a3998c2e9743782d9 Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 14 Nov 2026 04:37:15 +0100 Subject: [PATCH] Test: the bus module's keeper consumer filters a watched mesh-seat event on its parts Covers busstate.go keeperConsumer for the seat definition subject catalog-revision.: restoring the old body fails the table test. Builds: design 47 G (seat definition subjects with parts) Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h --- modules/mesh-grants/internal/buscompose/buscompose_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/mesh-grants/internal/buscompose/buscompose_test.go b/modules/mesh-grants/internal/buscompose/buscompose_test.go index 8804b637..9fe6a8bc 100644 --- a/modules/mesh-grants/internal/buscompose/buscompose_test.go +++ b/modules/mesh-grants/internal/buscompose/buscompose_test.go @@ -1670,6 +1670,11 @@ func TestWatchedEventSubjectTakesTheDefinitionsParts(t *testing.T) { if !ok || !slices.Contains(consumer.Filters, row.want) { t.Errorf("%s: consumer filters %v (%v), want %s", row.name, consumer.Filters, ok, row.want) } + // The bus module's process hears the same event on the same filter (keeperConsumer). + keeper, kok := keeperConsumer(Principal{Kind: KindModule, Node: "novox", Module: "node-tools", Process: "keeper", Watches: p.Watches}) + if !kok || !slices.Contains(keeper.Filters, row.want) { + t.Errorf("%s: keeper consumer filters %v (%v), want %s", row.name, keeper.Filters, kok, row.want) + } perms, err := PermissionsFor(p) if err != nil || !MaySubscribe(perms, strings.Replace(row.want, "*", "main", 1)) { t.Errorf("%s: the watcher may not subscribe %s (%v)", row.name, row.want, err)