完善任务部分成功状态与运行概览

补充证书部署部分成功的任务状态、HTTP响应和前端任务展示,并增加对应测试。
This commit is contained in:
xuans committed 2026-09-30 00:12:23 +08:00
1 parent a9f17c740a
commit 2b9d82df2f
7 files changed
+70 -13

No files matched your search

@@ -258,3 +258,16 @@ func TestCertificateTerminalPersistenceFailureIsReturnedWithoutReissue(t *testin
t.Fatalf("calls=%d error=%v logged=%v", calls, err, logged)
}
}
func TestCertificateTasksRecordPartialDeploymentFailure(t *testing.T) {
w, a := newCertificateTaskFixture(t)
_, err := w.run(t.Context(), "task-domain", "renewal_run", "certificate_issue", 1, 0, func(context.Context, string) (CertificateWorkflowResult, error) {
return CertificateWorkflowResult{
Deployment: deployment.Report{Total: 2, Success: 1, Failed: 1, Status: "partial"},
}, errors.New("partial deployment")
})
if err == nil {
t.Fatal("partial deployment error should remain visible to the caller")
}
assertCertificateTask(t, a, "partial_success", "partial_success")
}