From 9c38aed7890532e6f2e8e24418b640f1df6faeb7 Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 25 Oct 2026 00:06:06 +0200 Subject: [PATCH] Read the declaration a served-key test checks from the composition, since the plan verb is gone (issue 1945) --- cmd/mesh-controller/terminal_settings_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd/mesh-controller/terminal_settings_test.go b/cmd/mesh-controller/terminal_settings_test.go index 3962862a..81435ac2 100644 --- a/cmd/mesh-controller/terminal_settings_test.go +++ b/cmd/mesh-controller/terminal_settings_test.go @@ -9,6 +9,7 @@ import ( "testing" "git.novox.be/novox/mesh-sdk/go/catalogue" + "git.novox.be/novox/mesh-sdk/go/compose" "github.com/novox/mesh-controller/internal/broker" ) @@ -212,8 +213,12 @@ func TestAServedKeyIsRefusedThroughAVerb(t *testing.T) { refused("a setting a trusted file asks for, through the verb", throughVerb(t, "settings", map[string]any{ "module": "power", "node": "anchor", "values": `{"lid":"ignore","x":0}`})) // And `trusted` is the catalogue's word: it never reaches the machine, whose engine parses strictly. - plan := printed(t, func() error { return atTheTerminal(t, "plan", "anchor", "--json") }) - if strings.Contains(plan, `"trusted"`) { + declared, _, err := composeQuestion(ctx, open, "anchor", compose.Reading, false) + if err != nil { + t.Fatal(err) + } + body, _ := json.Marshal(declared.Resources) + if strings.Contains(string(body), `"trusted"`) { t.Fatal("the declaration carries the catalogue's `trusted`") } }