Skip to content

test(relay): skip 2 PG-dependent admin report/feedback 404 tests - #4685

Open
kushaim wants to merge 1 commit into
block:mainfrom
kushaim:fix/4083-skip-pg-admin-tests
Open

test(relay): skip 2 PG-dependent admin report/feedback 404 tests#4685
kushaim wants to merge 1 commit into
block:mainfrom
kushaim:fix/4083-skip-pg-admin-tests

Conversation

@kushaim

@kushaim kushaim commented Aug 4, 2026

Copy link
Copy Markdown

Fixes #4083.

admin::tests::report_detail_rejects_unknown_report and
admin::tests::feedback_attachment_rejects_unknown_feedback both call
test_state(), which eagerly seeds a community via
ensure_configured_community. Without BUZZ_TEST_DATABASE_URL pointing
at a live Postgres, the seed call panics with a PoolTimedOut-style
500 — surfaced as a 500 from the route, not the application-level
ApiError::not_found the assertions expect. So cargo test -p buzz-relay
fails on a clean dev box even though the assertions are right.

Sibling tests in the same module that assert 403 (admin-host gate,
before any DB access) keep passing — these two are the only ones
post-authorize DB call.

Adds the same #[ignore = "requires Postgres"] attribute already used
in 100+ places across buzz-db, buzz-relay/src/api/{bridge,invites,operator},
and buzz-search/tests/fts_integration.rs. With the attribute in place,
cargo test -p buzz-relay passes in PG-less environments and
maintainers opt back in with the existing live-Postgres flag
(BUZZ_TEST_DATABASE_URL=... cargo test -p buzz-relay -- --include-ignored).

Not touched: the out-of-scope follow-up the issue mentions —
refactoring test_state() to stop eagerly seeding a community so
even more admin tests can run without PG. That's a wider DX change
than this PR's scope and would unwind the parallel work for #4080.

Fixes block#4083.

admin::tests::report_detail_rejects_unknown_report and
admin::tests::feedback_attachment_rejects_unknown_feedback both call
test_state() which eagerly seeds a community via
ensure_configured_community. Without BUZZ_TEST_DATABASE_URL pointing
at a live Postgres, the seed panics with a 500 surfaced as the route's
response, not the application-level ApiError::not_found the assertions
expect.

Adds the same #[ignore = "requires Postgres"] attribute used in 100+
places across buzz-db, buzz-relay/src/api/{bridge,invites,operator},
and buzz-search/tests/fts_integration.rs. With the attribute, cargo
test -p buzz-relay passes in PG-less environments; maintainers opt
back in with the existing --include-ignored flag.

Signed-off-by: kushaim <carlossilvajimenez@gmail.com>
Copilot AI lite review requested due to automatic review settings August 4, 2026 08:17
@kushaim
kushaim requested a review from a team as a code owner August 4, 2026 08:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(relay): skip 2 PG-dependent admin report/feedback 404 tests when BUZZ_TEST_DATABASE_URL unset

2 participants