补充重新核查实库持久化测试并同步整改进度

This commit is contained in:
xuans committed 2026-10-04 00:01:25 +08:00
1 parent f9cd19f631
commit c1faebf9ef
12 files changed
+311 -60

No files matched your search

@@ -76,7 +76,23 @@ func runExternalRecovery(t *testing.T, fixture recoveryExternalFixture) {
t.Fatal(err)
}
runReconciliationSuccess(t, NewSQLDeploymentTransactionRepository(db, cfg.Driver), db, action)
if err := db.Close(); err != nil {
t.Fatal(err)
}
db = openRecoveryExternal(t, cfg)
recoveryCount(t, db, "recovery_dispositions", 2)
recoveryCount(t, db, "recovery_events", 4)
recoveryCount(t, db, "recovery_claims", 0)
pending, err := NewSQLDeploymentTransactionRepository(db, cfg.Driver).ListPendingDeploymentTransactions(t.Context())
if err != nil || len(pending) != 0 {
t.Fatal("重新打开实库后成功收尾丢失", err)
}
})
for _, stage := range []string{"started", "finished"} {
t.Run("reconciliation_audit/"+string(action)+"/"+stage, func(t *testing.T) {
runExternalReconciliationAuditFailure(t, fixture, action, stage)
})
}
}
for _, action := range []deployment.RecoveryAction{deployment.RecoveryActionRecord, deployment.RecoveryActionCommit, deployment.RecoveryActionRollback} {
for _, stage := range []string{"none", "started", "finished"} {