-
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.
Add
rivertest.WorkContext
for use testing JobArgs.Work
implementa…
…tions (#526) Here, add a new test helper called `rivertest.WorkContext`. Its purpose is to generate a realistic looking context for testing `JobArgs.Work` implementation, particularly by adding a client to context that makes `river.ClientFromContext` available in tests, but may also be used to add any other context-related features that may be added in the future. We've talked about new test helpers for running `Work` implementations and may still do that, but this is a primitive that makes testing a little better without having to add anything heavyweight.
- Loading branch information
Showing
5 changed files
with
48 additions
and
7 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
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