diff options
| author | aur-build <aur-build@localhost> | 2026-11-21 11:05:43 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-21 11:05:43 +0000 |
| commit | 7ccfb9a8f96b6f3000f36bdf76d95a4f6afd2826 (patch) | |
| tree | 710a12ec5cc6e2e93d717787dccc7660ddc4b5ba /tests | |
| parent | d3da3a1882999a80db34089153f9684fd8d7bbee (diff) | |
| download | aur-build-7ccfb9a8f96b6f3000f36bdf76d95a4f6afd2826.tar.gz aur-build-7ccfb9a8f96b6f3000f36bdf76d95a4f6afd2826.zip | |
db: delete two candidate queries nothing in production calls
`open_reviews_for` and `reopen_rejected` were both declared in `db`, both
re-exported by `review::candidates`, and both reached by nobody in `src`. The
auditor found them; the reason they stayed invisible is in the next commit.
`reopen_rejected` is simply gone: no caller, no test, nothing to lose.
`open_reviews_for` was a test convenience — `tests/detect.rs` used it to fetch
"the pending candidate for this pkgbase". The production query `pending` already
returns pending candidates and `CandidateRow` carries `pkgbase_id`, so the test
now filters that instead. Same assertion, same rows, one fewer public function
that existed only because a test wanted it.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/detect.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/detect.rs b/tests/detect.rs index 86d1315..7edc529 100644 --- a/tests/detect.rs +++ b/tests/detect.rs @@ -17,7 +17,10 @@ fn seed(env: &Env, name: &str, pkgver: &str, pkgrel: &str, extra: &str) -> Strin fn pending(env: &Env, name: &str) -> Option<CandidateRow> { let pb = db::get_pkgbase(&env.db, name).unwrap().unwrap(); - candidates::open_reviews_for(&env.db, pb.id).unwrap().into_iter().next() + candidates::pending_candidates(&env.db) + .unwrap() + .into_iter() + .find(|c| c.pkgbase_id == pb.id) } fn accepted(env: &Env, name: &str) -> Option<ReleaseRow> { |
