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`") } }