-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
add upgrade unit test #1440
add upgrade unit test #1440
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1440 +/- ##
==========================================
+ Coverage 46.26% 46.32% +0.06%
==========================================
Files 123 123
Lines 38878 38905 +27
Branches 38878 38905 +27
==========================================
+ Hits 17987 18023 +36
+ Misses 19918 19908 -10
- Partials 973 974 +1
|
assert!(FailoverPolicy::try_from(s).is_err()); | ||
} | ||
|
||
let str = String::from("flush"); |
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.
Thanks for the test! Is it necessary to test String?
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.
Thank you for response and suggestion! I test String type transform here to increase code coverage. Indeed, testing String type is optional.
Also please remove the unnecessary commits. |
@hijackthe2 Let's remove the unnecessary commits and merge it, thanks! |
3130df6
to
ea15402
Compare
test type transformation between struct FailoverPolicy and String/&str
add unit test in service/src/upgrade.rs
Details
add function test_failover_policy to test FailoverPolicy::try_from
Types of changes
What types of changes does your PullRequest introduce? Put an
x
in all the boxes that apply:Checklist
Go over all the following points, and put an
x
in all the boxes that apply.