-
Notifications
You must be signed in to change notification settings - Fork 950
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
test: add test cases for parse_test.go #2600
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2600 +/- ##
==========================================
- Coverage 69.47% 69.37% -0.11%
==========================================
Files 279 279
Lines 18825 18825
==========================================
- Hits 13079 13060 -19
- Misses 4280 4297 +17
- Partials 1466 1468 +2
|
We found this is your first time to contribute to Pouch, @WillSmisi |
402996e
to
88567a0
Compare
Seems that you signed off with a wrong email? The commit would not be attributed to you. Just let you know, and you might wanna have a double check on it. (Refer to Setting your commit email address in Git) |
@ihac Thank you for telling the message about my mistakes.🤓 |
apis/filters/parse_test.go
Outdated
wantErr bool | ||
}{ | ||
{ | ||
"mapping keys are in the accepted set", |
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.
@WillSmisi since there are many fields for the test case, could we add the filed name when we do assignment? something like that
{
name: xxx,
testArgs: yyy,
accepted: zzz,
...
}
It can be more clear for other. Thanks
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.
@fuweid Thank you for suggestions.
I saw other test files also miss the filed names and The IDE that I used can autocomplete them, so I guessed maybe this is a special style. It seems I'm wrong. Ahh~
Now I know this is not good for others, I 'll follow your advice right now.
thank you again!
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.
both styles are ok to golint/gofmt. But I think it can be better if the assignment is not one-line. Thanks for the update.
Signed-off-by: WillSmisi <764947976@qq.com>
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
Ⅰ. Describe what this PR did
test: add test cases for parse_test.go
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews