-
Notifications
You must be signed in to change notification settings - Fork 41
move to testify for testing #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adopts the testify library for Go tests to reduce code verbosity and improve test readability. The change replaces manual error checking and assertion patterns with testify's assert and require functions.
- Adds testify/assert and testify/require dependencies to simplify test assertions
- Replaces verbose manual error checking patterns with concise testify functions
- Maintains the same test logic while significantly reducing lines of code
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Adds testify dependency and moves goleak to direct dependencies |
| dbos/workflows_test.go | Replaces manual error checks and assertions with testify functions |
| dbos/utils_test.go | Simplifies error handling in test utility functions |
| dbos/serialization_test.go | Converts manual assertions to testify assertions |
| dbos/queues_test.go | Replaces verbose test patterns with testify equivalents |
| dbos/logger_test.go | Simplifies logger test assertions |
| dbos/dbos_test.go | Converts basic DBOS test assertions |
| dbos/client_test.go | Streamlines client test error handling and assertions |
| dbos/admin_server_test.go | Simplifies admin server test validations |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Use https://github.com/stretchr/testify in our tests. This reduces significantly the amounts of LoC in the tests.