-
Notifications
You must be signed in to change notification settings - Fork 594
test(cli): minor cleanups in diff tests #4594
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
Conversation
Helper to generate (direct) object ids.
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.
Pull Request Overview
This PR introduces minor cleanups to diff tests by replacing the direct use of index-generated IDs with new helper functions (oidForString and oidForContent) to generate direct object IDs.
- Replaced calls to index.IDFromHash with oidForString for clearer, centralized ID generation.
- Updated import paths and adjusted test signatures to pass *testing.T where necessary.
Comments suppressed due to low confidence (2)
internal/diff/diff_test.go:468
- [nitpick] Consider renaming 'LatestSnapshotManifest' to 'latestSnapshotManifest' to follow conventional Go naming practices for local variables.
LatestSnapshotManifest := &snapshot.Manifest{
internal/diff/diff_test.go:113
- The prefix for generating oid2 has been changed from 'i' to 'p', which may lead to identical object IDs for different directories. Confirm that this change is intentional and does not cause unintended collisions in object identifiers.
oid2 := oidForString(t, "p", "dfjlgn")
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4594 +/- ##
==========================================
+ Coverage 75.86% 76.38% +0.51%
==========================================
Files 470 527 +57
Lines 37301 40091 +2790
==========================================
+ Hits 28299 30623 +2324
- Misses 7071 7449 +378
- Partials 1931 2019 +88 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Rohit-BM18
left a comment
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.
LGTM
Helper to generate (direct) object ids.