Skip to content

Conversation

@bgentry
Copy link
Contributor

@bgentry bgentry commented Sep 30, 2025

The existing TestTxPgx forced a specific non-Pro driver while also holding useful internal logic around setting a default search path. To make this more reusable, expose a far more flexible TestTxWithDriver variant (used by TestTxPgx) which takes a custom driver, allows custom opts, and returns both the tx and schema—all while still setting the default search_path so that others can avoid reimplementing those parts.

Being leveraged by riverqueue/riverui#435.

@bgentry bgentry force-pushed the bg-more-reusable-riverdbtest branch from eb7b19e to 05788c5 Compare October 1, 2025 01:02
The existing `TestTxPgx` forced a specific non-Pro driver while also
holding useful internal logic around setting a default search path. To
make this more reusable, expose a far more flexible `TestTxPgxDriver`
variant (used by `TestTxPgx`) which takes a custom driver, allows custom
opts, and returns both the tx and schema—all while still setting the
default `search_path` so that others can avoid reimplementing those
parts.
@bgentry bgentry force-pushed the bg-more-reusable-riverdbtest branch from 05788c5 to 08e8db0 Compare October 1, 2025 01:03
@bgentry bgentry requested a review from brandur October 1, 2025 01:06
@bgentry bgentry merged commit 822d5bb into master Oct 1, 2025
10 checks passed
@bgentry bgentry deleted the bg-more-reusable-riverdbtest branch October 1, 2025 01:32
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.

3 participants