Join 11: the node seat's discovery test names the engine's own module, not a fixed one

H-17 made discovery read the node-engine's own name (§527) instead of the constant mesh-host,
but the integration test still gave its link no own name and expected mesh-host, so every
endpoint announced an empty module. It now gives the link an own name and expects that one.

Builds: design 47 G §634, A-149

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
2026-11-12 14:13:34 +01:00
parent d18bf8b3fd
commit 0c37ac378c
+5 -1
View File
@@ -483,6 +483,10 @@ func TestNatsAHandOverIsAskedOfTheNode(t *testing.T) {
})
// 774 (ADR 0563 §1): the node seat is served on this node's subjects alone, naming its caller, and said to discovery.
t.Run("the node seat is served on this node and discovered", func(t *testing.T) {
// Discovery names the engine's own module as §527 reads it, no fixed name (design 47 G §634, A-149).
own := NewOwnName()
own.Set("the-engine")
l.UseOwnName(own)
l.ServeEngineSeat(func(c EngineCall) (any, error) { return c.Verb + " for " + c.Caller, nil })
reply, err := conn.Request("mesh.seat.node-engine.call.acts."+m.Node+".shanks~node-tools", []byte(`{}`), 5*time.Second)
if err != nil || !strings.Contains(string(reply.Data), `"result":"acts for shanks.node-tools"`) {
@@ -509,7 +513,7 @@ func TestNatsAHandOverIsAskedOfTheNode(t *testing.T) {
announced := 0
for _, e := range said.Endpoints {
md := e.Metadata
if md["kind"] != "seat" || md["scope"] != "node" || md["seat"] != EngineSeat || md["module"] != "mesh-host" ||
if md["kind"] != "seat" || md["scope"] != "node" || md["seat"] != EngineSeat || md["module"] != "the-engine" ||
md["node"] != m.Node || md["description"] == "" || !strings.HasPrefix(md["schema"], "{") {
t.Errorf("the endpoint on %s announces %v", e.Subject, md)
}