Repository navigation
test(sdk): validate handle_response status and length edge cases - #3202
Merged
Merged
Conversation
Contributor
Author
|
@hubcio Hi can you please review this ? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3202 +/- ##
=============================================
- Coverage 73.84% 58.96% -14.89%
Complexity 943 943
=============================================
Files 1193 1192 -1
Lines 108933 98419 -10514
Branches 85949 75452 -10497
=============================================
- Hits 80444 58033 -22411
- Misses 25758 37770 +12012
+ Partials 2731 2616 -115
🚀 New features to boost your workflow:
|
hubcio
requested changes
Apr 30, 2026
Add tests to ensure handle_response returns errors for non-zero status codes and when declared length exceeds available data. Also verify successful responses for valid status and bounded lengths. test(sdk): validate handle_response status and length edge cases
Contributor
Author
|
@hubcio Hey I didnt get the Check status failing in the previous commit |
hubcio
approved these changes
May 14, 2026
spetz
approved these changes
May 14, 2026
numinnex
approved these changes
May 14, 2026
This file contains hidden or 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
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.
Rationale
Tests for
handle_responsedid not cover important edge cases around status codes and response length, leaving potential failure scenarios unverified.What changed?
handle_responsebehavior was not validated for error conditions such as non-zero status codes or when the declared response length exceeds available data.Added unit tests covering both success and failure paths, including boundary conditions for status and length handling.
AI Usage
None