-
Notifications
You must be signed in to change notification settings - Fork 120
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 for replicateAdditionCallback #1071
base: main
Are you sure you want to change the base?
test: add test for replicateAdditionCallback #1071
Conversation
Thanks for making a pull request! 😃 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1071 +/- ##
==========================================
+ Coverage 14.86% 14.87% +0.01%
==========================================
Files 86 86
Lines 8181 8181
==========================================
+ Hits 1216 1217 +1
+ Misses 6649 6648 -1
Partials 316 316 ☔ View full report in Codecov by Sentry. |
9d4bbd5
to
00ab810
Compare
00ab810
to
6230e8f
Compare
Signed-off-by: prakharagarwal1 <[email protected]>
Signed-off-by: prakharagarwal1 <[email protected]>
Signed-off-by: prakharagarwal1 <[email protected]>
Signed-off-by: prakharagarwal1 <[email protected]>
06f04a4
to
a01dfcb
Compare
// Check if the destination directory is removed | ||
_, err = os.Stat(destinationDir) | ||
if err != nil { | ||
if os.IsExist(err) { |
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.
if the err
is something else, you might want to log that as well, no?
} | ||
|
||
// Check if the destination directory is removed | ||
_, err = os.Stat(destinationDir) |
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.
Is this check only for the destination directory? what about the files that were copied from source? Or the sub-directories that could have existed in the source?
@Prakhar-Agarwal-byte would you like to attend to @seshapad queries on this PR, so we can keep it moving? Thank you for your contributions! |
@kmehant Yes, I will update the PR with the required changes |
Added test for replicateAdditionCallbackin the filesystem package.
This tests if the destination directory is indeed removed after the callback.
Fixes a part of #881