Add coverage on pkg/fileutils#12840
Conversation
ee187af to
a4d38c0
Compare
a4d38c0 to
e4e046d
Compare
|
I'd prefer to let #12245 get merged in first because I think the new testcases in there for Matches could cover some of this already. @vdemeester can you see if there's an overlap? |
|
@duglin You're right, there is some testcases that will cover it, and from a really quick look there is a few (like 2 tests). I'll wait for this to be merged, and will rebase/update my tests then ;) |
e4e046d to
8c43684
Compare
|
LGTM |
There was a problem hiding this comment.
I would put something in the file so that its not "zero size" then when you check "bytes != 0" you can be sure that its zero because it didn't copy it and not because it copied an zero size file.
There was a problem hiding this comment.
Completely agree, will do :)
|
Just a couple of minor comments. |
8c43684 to
961292e
Compare
Should fix moby#11598 Signed-off-by: Vincent Demeester <[email protected]>
961292e to
8454e1a
Compare
|
@duglin Took care of your comments |
|
@vdemeester great - thanks! |
Related to #11598, adding coverage to
pkg/fileutils, on the following methods :CopyFileMatchesI don't really know how to test easily
GetTotalUsedFdsthough.. But the coverage is around 91%.Signed-off-by: Vincent Demeester [email protected]