State a tool check that waits for the operator as waiting (issue 386, ADR 0283)
A module whose only fault was a secret the operator had not given yet was stated unhealthy, failed its first-node gate and was put back. The engine now reads the tool's answer through mesh-sdk go/health and states such a resource waiting, with what it waits for, on one look; a malformed wait stays unhealthy.
This commit is contained in:
@@ -29,11 +29,11 @@ func TestNatsAToolCheckIsAskedOnTheLink(t *testing.T) {
|
||||
q.attach(t.Context(), &natsLink{conn: conn, js: js, node: node})
|
||||
ctx, cancel := context.WithTimeout(t.Context(), 2*time.Second)
|
||||
defer cancel()
|
||||
healthy, why, err := q.AskTool(ctx, "sensors", "sensors_health")
|
||||
if err != nil || !healthy {
|
||||
t.Fatalf("a served healthy tool read as %v %q (%v)", healthy, why, err)
|
||||
a, err := q.AskTool(ctx, "sensors", "sensors_health")
|
||||
if err != nil || !a.Healthy {
|
||||
t.Fatalf("a served healthy tool read as %+v (%v)", a, err)
|
||||
}
|
||||
_, _, err = q.AskTool(ctx, "sensors", "nothing_serves_this")
|
||||
_, err = q.AskTool(ctx, "sensors", "nothing_serves_this")
|
||||
if err == nil || !strings.Contains(err.Error(), "nothing on this machine answers") {
|
||||
t.Fatalf("a tool nothing serves read as %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user