test(relay): skip 2 PG-dependent admin report/feedback 404 tests - #4685
Open
kushaim wants to merge 1 commit into
Open
test(relay): skip 2 PG-dependent admin report/feedback 404 tests#4685kushaim wants to merge 1 commit into
kushaim wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4083.
admin::tests::report_detail_rejects_unknown_reportandadmin::tests::feedback_attachment_rejects_unknown_feedbackboth calltest_state(), which eagerly seeds a community viaensure_configured_community. WithoutBUZZ_TEST_DATABASE_URLpointingat a live Postgres, the seed call panics with a
PoolTimedOut-style500 — surfaced as a 500 from the route, not the application-level
ApiError::not_foundthe assertions expect. Socargo test -p buzz-relayfails 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-
authorizeDB call.Adds the same
#[ignore = "requires Postgres"]attribute already usedin 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-relaypasses in PG-less environments andmaintainers 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 soeven 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.