diff --git a/internal/nodegrant/nodegrant_test.go b/internal/nodegrant/nodegrant_test.go new file mode 100644 index 00000000..6e1de5b8 --- /dev/null +++ b/internal/nodegrant/nodegrant_test.go @@ -0,0 +1,19 @@ +package nodegrant + +import ( + "slices" + "testing" +) + +// Design 47 G A-461b: the node asks the seat mesh-catalog's verbs entry, module and seat-definitions through the seat's call +// subjects, so its grant holds each; a grant without one makes that call hang until the node's own bound (the verb module was +// declared in the manifest but missing here, which held the node-engine's integration tests for 58 s). +func TestTheNodeGrantHoldsTheCatalogVerbsTheComposerAsks(t *testing.T) { + p := For("it1") + for _, verb := range []string{"entry", "module", "seat-definitions"} { + want := "mesh.seat.mesh-catalog.call." + verb + ".node~it1" + if !slices.Contains(p.Publish, want) { + t.Errorf("the node's grant does not publish to %s", want) + } + } +} diff --git a/internal/nodegrant/testdata/node.json b/internal/nodegrant/testdata/node.json index 0270797c..70cea869 100644 --- a/internal/nodegrant/testdata/node.json +++ b/internal/nodegrant/testdata/node.json @@ -116,6 +116,7 @@ "$SRV.PING.node-tools.NODE", "mesh.control.NODE.>", "mesh.seat.mesh-catalog.call.entry.node~NODE", + "mesh.seat.mesh-catalog.call.module.node~NODE", "mesh.seat.mesh-catalog.call.seat-definitions.node~NODE", "mesh.seat.node-backup.call.backed-up.NODE.node~NODE", "mesh.seat.node-backup.call.now.NODE.node~NODE",