-
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 unit test case for func ParseEnv #2584
Conversation
Signed-off-by: jahentao <jahentao@qq.com>
Codecov Report
@@ Coverage Diff @@
## master #2584 +/- ##
=========================================
Coverage ? 69.11%
=========================================
Files ? 278
Lines ? 18686
Branches ? 0
=========================================
Hits ? 12914
Misses ? 4296
Partials ? 1476
|
We found this is your first time to contribute to Pouch, @jahentao |
How can i ask for a review? |
{"test multiple '=' envs", args{env: []string{"A=1=2"}}, map[string]string{"A": "1=2"}, false}, | ||
{"test nil env", args{env: nil}, map[string]string{}, false}, // empty map | ||
{"test empty env", args{env: []string{""}}, nil, true}, | ||
{"test empty blank", args{env: []string{" "}}, nil, true}, |
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.
how about add a duplicate env test case?
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.
@ZYecho Thanks for your reviewing. Maybe it not sufficiently test before :-), such as nil and empty env situation, and i need a easy entry point for my first contributing. I will do better later.
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.
Yep, you can simply make another commit for this pr.
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 |
Signed-off-by: jahentao jahentao@qq.com
Ⅰ. Describe what this PR did
test: add unit test case for func ParseEnv
Ⅱ. Does this pull request fix one issue?
NONE
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
added
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews