test(library): 两次recover的202响应留在raw里
build / build (push) Successful in 1m30s

第一/第二次 recover 的 HTTP 202 与队列 id 原先只在用例断言里,raw 只留了失败结果。
补两份 accepted 回应,报告可直接引用接口受理证据而不是转述断言。
This commit is contained in:
姚章浩
2026-11-02 23:00:25 +08:00
parent 0d180aa401
commit 22fb33aa75
@@ -368,6 +368,7 @@ WHERE index_name=$1 AND document_id='chunk-target'`, fx.index).Scan(&row); err !
if code != http.StatusAccepted {
t.Fatalf("recover with a held dispatch boundary => %d %v", code, accepted)
}
save("17n-recover-accepted.json", map[string]any{"http": code, "body": accepted, "window_job_id": job.ID})
queueID, _ := accepted["job"].(map[string]any)["id"].(string)
if queueID == "" {
t.Fatalf("recover response has no queue job: %v", accepted)
@@ -490,6 +491,8 @@ WHERE index_name=$1 AND document_id='chunk-target'`, fx.index).Scan(&row); err !
if secondCode != http.StatusAccepted {
t.Fatalf("second recover via the normal API => %d %v", secondCode, secondAccepted)
}
save("17n2-second-recover-accepted.json", map[string]any{"http": secondCode, "body": secondAccepted,
"window_job_id": job.ID})
secondQueue, _ := secondAccepted["job"].(map[string]any)["id"].(string)
if secondQueue != governance.LibraryRecoveryQueueID(job.ID) {
t.Fatalf("second recover queue id = %q, want the window's own %q", secondQueue,