-
Notifications
You must be signed in to change notification settings - Fork 32
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
Unit test improvements #206
Conversation
fb3fcb6
to
54cef4e
Compare
fileList, err := loc.ListByPrefix(test.prefix) | ||
lt.NoError(err, test.description) | ||
lt.Equal(test.expectedFiles, fileList, test.description) | ||
lt.Run(test.description, func() { |
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.
love it... makes for easier runing for table-driven tests.
if err != nil { | ||
ts.Fail("Shouldn't return error creating test s3.File instance.") | ||
} | ||
ts.Require().NoError(err, "Shouldn't return error creating test s3.File instance.") |
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.
much clearer construct
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.
Actually only one change needed, update the CHANGELOG.md, under ## [Unreleased]
with summary of your changes, adhering to https://keepachangelog.com/en/1.1.0/ semantics.
For instance:
## [Unreleased]
### Fixed
- Unit Test improvements: report underlying unit tests errors, always run test cases in sub-test, always use test suite functions, use more specific assert functions where possible.
When a release is created we'll update the section for the release.
A couple of improvements to make failing unit tests a little easier to diagnose.