A person invoking one tool holds it both ways it is addressed (the test, after #185)

This commit is contained in:
2026-10-01 14:45:31 +02:00
parent 603ad61142
commit f450303e8e
+5 -2
View File
@@ -42,8 +42,11 @@ func TestAPersonMayCallToolsAndNothingElse(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
if len(perms.Publish) != 1 || perms.Publish[0] != "mesh.mod.mesh-catalog.tool.catalog_tools" { // The one tool, both ways it is addressed (novox/hq ADR 0159): to whichever instance
t.Errorf("ada may publish %v, which should be the one tool and nothing else", perms.Publish) // answers, and to the instance on one machine. Nothing else.
if len(perms.Publish) != 2 || perms.Publish[0] != "mesh.mod.mesh-catalog.tool.catalog_tools" ||
perms.Publish[1] != "mesh.mod.mesh-catalog.tool.catalog_tools.*" {
t.Errorf("ada may publish %v, which should be the one tool, both ways addressed, and nothing else", perms.Publish)
} }
for _, s := range perms.Publish { for _, s := range perms.Publish {
if strings.HasPrefix(s, "mesh.control") || strings.HasPrefix(s, "mesh.node") || if strings.HasPrefix(s, "mesh.control") || strings.HasPrefix(s, "mesh.node") ||