-
Notifications
You must be signed in to change notification settings - Fork 801
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 tests for LeaseTaskList #6042
Unit tests for LeaseTaskList #6042
Conversation
assert.ErrorContains(t, err, assert.AnError.Error()) | ||
} | ||
|
||
func TestLeaseTaskList_selectErrNotFound(t *testing.T) { |
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.
I think it would be easier to read this as a table test:
for _, tc := []struct{
name string
prepareDB(*db.Mock)
assertError func(t *testing.T, err error)
assertResult func(t * testing.T, res)
}
It would be easier to assess if all possible cases are covered, and it should be easier to read.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
... and 8 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
192dfcb
to
18e05bc
Compare
18e05bc
to
725cad2
Compare
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.
LGTM, though I suggest moving helpers down the file.
But this is more of a nit style opinion
725cad2
to
cfb5799
Compare
Pull Request Test Coverage Report for Build 018fa9e9-e31c-40b5-97ac-941c9c147468Details
💛 - Coveralls |
What changed?
Why?
Increase coverage
How did you test it?
Potential risks
Release notes
Documentation Changes