Add repo-memory integration tests
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user