Cover OpsProof execution revalidation
Homelab Main / validate (push) Failing after 1m52s Details
Homelab Main / running-update (push) Has been skipped Details
Homelab Main / debian-ops (push) Has been skipped Details

This commit is contained in:
juvenal.diaz 2026-12-05 08:37:06 -06:00
parent 7ab3bc0ec0
commit 68b3d53a61
1 changed files with 4 additions and 1 deletions

View File

@ -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)
}
}