Add repo-memory integration tests

This commit is contained in:
2026-03-20 16:01:48 +08:00
parent dd6b9c2c1f
commit 9915e12a30
16 changed files with 1394 additions and 79 deletions
@@ -674,22 +674,32 @@ func (s *Store) ListVerifyCandidates(ctx context.Context, repoRoot string) ([]Ve
if err != nil {
return nil, err
}
defer rows.Close()
var candidates []VerifyCandidate
for rows.Next() {
var c VerifyCandidate
if err := rows.Scan(&c.ID, &c.RepoPath, &c.Kind, &c.Key, &c.Title, &c.Status, &c.VerifiedOnCommit); err != nil {
rows.Close()
return nil, err
}
deps, err := s.listDependencies(ctx, c.ID)
candidates = append(candidates, c)
}
if err := rows.Err(); err != nil {
rows.Close()
return nil, err
}
if err := rows.Close(); err != nil {
return nil, err
}
for i := range candidates {
deps, err := s.listDependencies(ctx, candidates[i].ID)
if err != nil {
return nil, err
}
c.Dependencies = deps
candidates = append(candidates, c)
candidates[i].Dependencies = deps
}
return candidates, rows.Err()
return candidates, nil
}
func (s *Store) ApplyVerificationResult(ctx context.Context, entryID int64, currentCommit, nextStatus, reason string) error {