-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat(testutil): add unit tests and remove unused functions #937
Merged
ijsong
merged 8 commits into
main
from
testutil_add_unit_tests_and_remove_unused_functions
Feb 3, 2025
Merged
feat(testutil): add unit tests and remove unused functions #937
ijsong
merged 8 commits into
main
from
testutil_add_unit_tests_and_remove_unused_functions
Feb 3, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #937 +/- ##
==========================================
+ Coverage 79.08% 80.31% +1.23%
==========================================
Files 180 179 -1
Lines 21615 21550 -65
==========================================
+ Hits 17094 17308 +214
+ Misses 3711 3467 -244
+ Partials 810 775 -35 ☔ View full report in Codecov by Sentry. |
44c7bb6
to
eeb910a
Compare
05fbd28
to
6a0c55f
Compare
eeb910a
to
e097a93
Compare
6a0c55f
to
7500d39
Compare
e097a93
to
e5da418
Compare
7500d39
to
fc72ef5
Compare
hungryjang
approved these changes
Feb 1, 2025
e5da418
to
3821d9b
Compare
fc72ef5
to
c9d5fa8
Compare
- Add tests for StorageNodeMetadataDescriptor and LogStreamReplicaMetadataDescriptor - Test methods: ToStorageNodeDescriptor, GetLogStream, Head, and Tail - Ensure proper coverage for edge cases and nil values
- Add comments for SyncPosition.InvalidSyncPosition, SyncPosition.Invalid, SyncPosition.LessThan, SyncRange.InvalidSyncRange, and SyncRange.Validate methods. - Add unit tests for SyncRange validation and invalid cases.
- replaced InvalidLogEntry with an empty LogEntry across the codebase - removed proto/varlogpb/log_entry.go as it contained unused code - updated related files to reflect these changes
- Removed unused functions from metadata.go - Added comprehensive unit tests for metadata.go and metadata_test.go - Improved test coverage for various scenarios
- Added `proto/varlogpb/replica_test.go` to test `EqualReplicas` and `ValidReplicas` functions. - Included various test cases to ensure correct functionality.
- Added new file: proto/varlogpb/storage_node_test.go - Includes tests for StorageNodeDescriptor validation
- Added unit tests for StoppableListener to cover various scenarios: - Valid and invalid addresses - Accepting connections after stopping - Successful connection acceptance - Improved test coverage and ensured reliability of the StoppableListener implementation.
- Added `pkg/util/testutil/testutil_test.go` for unit testing. - Removed unused functions from `pkg/util/testutil/testutil.go`.
3821d9b
to
30e2b27
Compare
c9d5fa8
to
2f859d2
Compare
Base automatically changed from
test_netutil_add_tests_for_stoppablelistener
to
main
February 3, 2025 12:17
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does
pkg/util/testutil/testutil_test.go
for unit testing.pkg/util/testutil/testutil.go
.