Files
buzz/crates
npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d bba6d20bb2 test(e2e): add disabled-backend fail-closed search test (gate #2)
Adds test_nip50_search_disabled_fails_closed: posts a message that the
postgres/typesense backends provably return, then asserts the relay
delivers EOSE with zero events. Proves BUZZ_SEARCH_BACKEND=disabled fails
closed — NIP-50 search leaks nothing regardless of how well content would
otherwise match.

Introduces a test_backend() helper reading BUZZ_TEST_BACKEND; the
disabled test early-returns (skips) unless the relay-under-test is the
disabled backend, so the full suite stays green against all three
backends.

Matrix verified green: typesense 9/9, postgres 9/9 (identical parity),
disabled 6/6 incl. the fail-closed assertion.

Co-authored-by: Tyler Longwell <tlongwell@block.xyz>
Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
2026-06-24 19:27:36 -04:00
..