-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop client
Schema
configuration (#18)
As discussed in #15, the `Schema` configuration parameter doesn't actually do anything, and we realized that it's possible to support this feature by using an alternate configuration for pgxpool in `search_path`. Here, drop `Schema` and add a test that verifies that this technique works. So as to not have to create and migrate an alternate schema, we cheat a little bit by repointing the schema and then just verifying that we can't find a `river_job` table there. I'm finding the test hierarchy in `client_test.go` to be pretty confusing in determining on what best practice is for what should go where, so I'm starting out with a new `Test_Client` which I'm hoping we can start using as a base for most of the general tests in here in a more reusable way. I leverage `JobArgsReflectKind` and `WorkFunc` in its subtests so that it's not dependent on our various global job args that are defined all over the place. Instead, args and the work routine are colocated right inside the test. Configuring an alternate schema is definitely going to need its own documentation page somewhere because it's not obvious, but that'll come separately. Fixes #15.
- Loading branch information
Showing
3 changed files
with
84 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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