Add the replay of issue 331, so a tool check refused as no link fails before a merge
mesh/merge-gate pass: builds mesh-host → ace, g14, novox, shanks; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery delivered
mesh/delivery-group group replays/331-a-tool-check-on-the-live-link delivered: every member is delivered
mesh/merge-gate pass: builds mesh-host → ace, g14, novox, shanks; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery delivered
mesh/delivery-group group replays/331-a-tool-check-on-the-live-link delivered: every member is delivered
Written with only what the node-engine had before its fix, so mesh-lab's prover can lay it over the commit before (R331).
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package link
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// TestReplay331 is the replay of hq issue 331 (mesh-lab R331), written with only what the node-engine had
|
||||
// before its fix so it can be laid over the commit before: every declared tool check on a live machine
|
||||
// read "no link to the bus is open" while the link was up, because the link the engine attaches — the NATS
|
||||
// link — could not ask a tool, and the queue said that as no link.
|
||||
//
|
||||
// The NATS link is attached with no connection under it, so no bus is needed: the question must reach the
|
||||
// link and fail there, not stop at the queue as if no link were open.
|
||||
func TestReplay331(t *testing.T) {
|
||||
q := &Queue{Membership: Membership{Node: "laptop"}}
|
||||
q.attach(t.Context(), &natsLink{node: "laptop"})
|
||||
_, _, err := q.AskTool(t.Context(), "sensors", "sensors_health")
|
||||
if err == nil {
|
||||
t.Fatal("asked on no connection and was answered")
|
||||
}
|
||||
if strings.Contains(err.Error(), "no link to the bus is open") {
|
||||
t.Fatalf("a tool check on the attached NATS link was refused as no link: %v", err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user