Cover OpsProof execution revalidation
This commit is contained in:
parent
7ab3bc0ec0
commit
68b3d53a61
|
|
@ -34,7 +34,7 @@ func TestProposalApprovalAndExecutionAreSeparate(t *testing.T) {
|
|||
}
|
||||
doctorRequests++
|
||||
_, _ = response.Write([]byte(`{"id":"doctor-` + string(rune('0'+doctorRequests)) + `","status":"queued"}`))
|
||||
case "/v1/executions/doctor-1", "/v1/executions/doctor-2", "/v1/executions/doctor-3":
|
||||
case "/v1/executions/doctor-1", "/v1/executions/doctor-2", "/v1/executions/doctor-3", "/v1/executions/doctor-4":
|
||||
_, _ = response.Write([]byte(`{"id":"doctor","status":"failed","output":"{\"title\":\"Doctor\",\"rows\":[{\"status\":\"fail\",\"area\":\"Kubernetes apps\",\"check\":\"n8n\",\"summary\":\"CrashLoopBackOff\",\"detail\":\"container exits\",\"cause\":\"startup failure\"}]}"}`))
|
||||
case "/v1/executions/execution-approved":
|
||||
_, _ = response.Write([]byte(`{"id":"execution-approved","status":"succeeded","output":"repair completed"}`))
|
||||
|
|
@ -64,4 +64,7 @@ func TestProposalApprovalAndExecutionAreSeparate(t *testing.T) {
|
|||
}
|
||||
client.Get("/executions/1").AssertOK().AssertInertia("Execution").AssertProp("view.execution.status", "succeeded").AssertProp("view.execution.report_id", float64(1))
|
||||
client.Get("/reports/1").AssertOK().AssertInertia("Report").AssertProp("report.outcome", "needs-attention")
|
||||
if doctorRequests != 4 {
|
||||
t.Fatalf("workflow performed %d Doctor request(s), want 4", doctorRequests)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue