-
Notifications
You must be signed in to change notification settings - Fork 206
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
service: add some unit test cases #1455
Conversation
d84eaef
to
ad40c69
Compare
5aa1d1b
to
f3c54d1
Compare
Codecov Report
@@ Coverage Diff @@
## master #1455 +/- ##
==========================================
+ Coverage 44.37% 45.65% +1.28%
==========================================
Files 123 123
Lines 38896 39170 +274
Branches 38896 39170 +274
==========================================
+ Hits 17260 17885 +625
+ Misses 20695 20298 -397
- Partials 941 987 +46
|
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 your contrbution!
Maybe you could tidy up the commit logs, the current commit logs are a bit redundant.
For example: "smoke ci configurations" could change to "ci" or "action".
Thanks for reply! I have already adjusted the commit information. |
9f4135f
to
f4e995e
Compare
516ecd9
to
03e0516
Compare
696606a
to
4a84b63
Compare
…e.rs, singleton.rs under service/src 1. In blob_cache.rs, two simple lines of code have been added to cover previously missed cases. 2. In block_device.rs, some test cases are added to cover function export(), block_size(), blocks_to_size(), and size_to_blocks(). 3. In fs_cache.rs, some test cases are added to cover function try_from() for struct FsCacheMsgOpen and FsCacheMsgRead. 4. In singletion.rs, some test cases are added to cover function initialize_blob_cache() and initialize_fscache_service(). In addition, fscache must be correctly enabled firstly as the device file `/dev/cachefiles` will used by function initialize_fscache_service(). Signed-off-by: hijackthe2 <2948278083@qq.com>
Signed-off-by: hijackthe2 <2948278083@qq.com>
Since using `/dev/cachefiles` requires sudo mode, so some environment variables are defined and we use `sudo -E` to pass these environment variables to sudo operations. The script file for enabling fscache is misc/fscache/setup.sh Signed-off-by: hijackthe2 <2948278083@qq.com>
…e.rs, singleton.rs under service/src
/dev/cachefiles
will used by function initialize_fscache_service().i#tests: add unit test case for service/src/block_device.rs
Relevant Issue (if applicable)
If there are Issues related to this PullRequest, please list it.
Details
Please describe the details of PullRequest.
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.