diff --git a/cmd/mesh-controller/meshcli_reads_integration_test.go b/cmd/mesh-controller/meshcli_reads_integration_test.go index 5a76dfd2..6a33bfcc 100644 --- a/cmd/mesh-controller/meshcli_reads_integration_test.go +++ b/cmd/mesh-controller/meshcli_reads_integration_test.go @@ -10,11 +10,12 @@ import ( "github.com/novox/mesh-controller/internal/link" ) +// 1931/AC1: reading lines run with `doctor` in place of the removed `queue`. func TestAReadCallWritesNoJournalLine(t *testing.T) { said := journalled(t) ctx := link.WithCallID(context.Background(), "call-1") ordinary := cliVerdict{why: "not the terminal"} - for _, line := range [][]string{{"plans"}, {"status"}, {"conditions"}, {"node", "list"}, {"builds"}, {"queue"}, + for _, line := range [][]string{{"plans"}, {"status"}, {"conditions"}, {"node", "list"}, {"builds"}, {"doctor"}, {"settings", "show", "zsh"}, {"plans", "--json"}} { if a := runForMeshCLI(ctx, "g14", cliAsked("jochen", 1000, line...), ordinary); a.Exit != 0 || a.Refused != "" { t.Fatalf("%q did not run: %+v", line, a) diff --git a/cmd/mesh-controller/seatverbs_schema_integration_test.go b/cmd/mesh-controller/seatverbs_schema_integration_test.go index 10ac2c9f..c66a5ec9 100644 --- a/cmd/mesh-controller/seatverbs_schema_integration_test.go +++ b/cmd/mesh-controller/seatverbs_schema_integration_test.go @@ -67,6 +67,7 @@ func TestNoArgumentAVerbIsGivenIsPassedOver(t *testing.T) { } } +// 1931/AC1: the removed verbs `queue`, `clear` and `replay` are not named; existing reading verbs stand in. func TestAnArgumentAVerbDoesNotDeclareIsRefused(t *testing.T) { for name, v := range servedSchemas(t) { names, _ := declaredArguments(v) @@ -86,13 +87,13 @@ func TestAnArgumentAVerbDoesNotDeclareIsRefused(t *testing.T) { } } } - if _, err := argvFor("clear", map[string]any{"dead": "yes"}); err == nil { + if _, err := argvFor("doctor", map[string]any{"run": "yes"}); err == nil { t.Error("a switch took a word that is neither true nor false, and would have read it as false") } if _, err := argvFor("node", map[string]any{"node": 7}); err == nil { t.Error("a number was taken as a machine's name, or as no machine") } - if argv, err := argvFor("clear", map[string]any{"dead": true}); err != nil || strings.Join(argv, " ") != "clear --dead" { + if argv, err := argvFor("doctor", map[string]any{"run": true}); err != nil || strings.Join(argv, " ") != "doctor run --json" { t.Errorf("a switch given as JSON true: %v %v", argv, err) } } diff --git a/cmd/mesh-controller/seatverbs_schema_test.go b/cmd/mesh-controller/seatverbs_schema_test.go index 0aed1a96..c34ff0f5 100644 --- a/cmd/mesh-controller/seatverbs_schema_test.go +++ b/cmd/mesh-controller/seatverbs_schema_test.go @@ -170,15 +170,12 @@ func stringLit(e ast.Expr) (string, bool) { var accountedFlags = map[string]map[string]string{ "status": {"json": "set by the verb: the answer is data"}, "seats": {"json": "set by the verb: the answer is data"}, - "queue": {"json": "set by the verb: the answer is data, its output the table (novox/hq issue 455)"}, "plan": {"json": "set by the verb unless files is asked"}, "push": { "wait": "set by the verb to 0: a tool call cannot hold a connection for a whole apply", "all": "withheld: the verb naming no machine is --behind, and a push of every machine is said at a " + "shell (novox/hq ADR 0217); `command` reaches it", }, - // Kept only to be refused by name, naming what replaced it (novox/hq ADR 0501 §5, ADR 0429 §18). - "replay": {"register": "withheld: refused by name, a registered replay being removed (ADR 0501 §5)"}, "builds": {"n": "=limit"}, "plans": {"n": "=limit", "what-if": "=repository"}, // The machine's tunnel key, named as the verb's other arguments are (novox/hq ADR 0169).