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.<branch>: 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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user