fix(tests): query admin_audit by its real timestamp column 'at'
Two requeue-audit tests in api_admin_crawler ordered by created_at, but the admin_audit table's timestamp column is 'at' (migration 0019), so the queries failed at runtime with 42703 (column does not exist). This was the last pre-0.81 test breakage gating deploy; full suite now green locally (cargo test --no-fail-fast). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -573,7 +573,7 @@ async fn requeue_chapter_audit_records_chapter_target_id(pool: PgPool) {
|
||||
let (target_kind, target_id): (String, Option<Uuid>) = sqlx::query_as(
|
||||
"SELECT target_kind, target_id FROM admin_audit \
|
||||
WHERE action = 'crawler_dead_jobs_requeue' \
|
||||
ORDER BY created_at DESC LIMIT 1",
|
||||
ORDER BY at DESC LIMIT 1",
|
||||
)
|
||||
.fetch_one(&pool)
|
||||
.await
|
||||
@@ -601,7 +601,7 @@ async fn requeue_all_audit_omits_target_id_but_logs_count(pool: PgPool) {
|
||||
sqlx::query_as(
|
||||
"SELECT target_kind, target_id, payload FROM admin_audit \
|
||||
WHERE action = 'crawler_dead_jobs_requeue' \
|
||||
ORDER BY created_at DESC LIMIT 1",
|
||||
ORDER BY at DESC LIMIT 1",
|
||||
)
|
||||
.fetch_one(&pool)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user