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:
@@ -168,8 +168,8 @@ func TestReplaySilentWebAppIsSaidUnhealthy(t *testing.T) {
|
||||
looks := 0
|
||||
for time.Since(began) < 2*time.Minute {
|
||||
for _, d := range j.due() {
|
||||
ok, why := j.probes().Look(t.Context(), d.module, d.check)
|
||||
j.Record(d.id, d.started, ok, why)
|
||||
ok, why, waits := j.probes().Look(t.Context(), d.module, d.check)
|
||||
j.Record(d.id, d.started, ok, why, waits...)
|
||||
looks++
|
||||
}
|
||||
st, _ = j.Look(t.Context())
|
||||
@@ -183,7 +183,7 @@ func TestReplaySilentWebAppIsSaidUnhealthy(t *testing.T) {
|
||||
t.Fatalf("a web application answering nothing was not said unhealthy within two looks (%d looks): %+v", looks, s)
|
||||
}
|
||||
// And a TCP check would have said it reachable: the port is open.
|
||||
if ok, why := tcp.Look(t.Context(), "app", timing(&declaration.Health{Kind: declaration.HealthTCP, Port: published})); !ok {
|
||||
if ok, why, _ := tcp.Look(t.Context(), "app", timing(&declaration.Health{Kind: declaration.HealthTCP, Port: published})); !ok {
|
||||
t.Fatalf("a tcp check could not connect to the silent application: %s", why)
|
||||
}
|
||||
t.Logf("said %s (%s) after %d looks, %s after the judging began; a TCP check connects", s.State, s.Reason, looks,
|
||||
|
||||
Reference in New Issue
Block a user