-
Notifications
You must be signed in to change notification settings - Fork 119
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: added test for mergeProcessFileCallBack function #1121
Conversation
Signed-off-by: satyazzz123 <beherasatyajit716@gmail.com>
Thanks for making a pull request! 😃 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1121 +/- ##
==========================================
+ Coverage 14.76% 14.82% +0.05%
==========================================
Files 90 90
Lines 8379 8379
==========================================
+ Hits 1237 1242 +5
+ Misses 6824 6818 -6
- Partials 318 319 +1 ☔ View full report in Codecov by Sentry. |
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 @satyazzz123!
cc @seshapad
filesystem/merger_test.go
Outdated
func TestMergeProcessFileCallBack_SameContent(t *testing.T) { | ||
t.Run("test for source and destination files with same content", func(t *testing.T) { | ||
|
||
sourceFile, err := ioutil.TempFile("", "source") |
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.
Can you use a variable (named appropriately) to represent the empty string
Signed-off-by: satyazzz123 <beherasatyajit716@gmail.com>
filesystem/merger_test.go
Outdated
} | ||
defer os.Remove(sourceFile.Name()) | ||
|
||
destinationFile, err := ioutil.TempFile("", "destination") |
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.
Use nonExistentPath
here as well.
Signed-off-by: satyazzz123 <beherasatyajit716@gmail.com>
test for mergeProcessFileCallBack function
i) this test covers a scenario when the source and destination files are of same content.
fixes a part of #881