Make sure we normalize header types for test mock connection class#1111
Closed
Kami wants to merge 7 commits intoapache:trunkfrom
Closed
Make sure we normalize header types for test mock connection class#1111Kami wants to merge 7 commits intoapache:trunkfrom
Kami wants to merge 7 commits intoapache:trunkfrom
Conversation
string and not a number. Part of LIBCLOUD-945
Part of LIBCLOUD-745.
Kami
commented
Sep 19, 2017
| @@ -634,7 +634,7 @@ def _upload_in_chunks(self, response, data, iterator, object_path, | |||
| chunk_hash = base64.b64encode(b(chunk_hash.digest())) | |||
Member
Author
There was a problem hiding this comment.
Changes in those files are not needed anymore because we now cast header values inside the base connection class, but they don't hurt either.
Codecov Report
@@ Coverage Diff @@
## trunk #1111 +/- ##
==========================================
+ Coverage 85.33% 85.33% +<.01%
==========================================
Files 342 342
Lines 65695 65709 +14
Branches 5856 5855 -1
==========================================
+ Hits 56060 56072 +12
- Misses 7250 7252 +2
Partials 2385 2385
Continue to review full report at Codecov.
|
pquentin
reviewed
Sep 20, 2017
|
|
||
| if blob_type == 'PageBlob': | ||
| headers['Content-Length'] = 0 | ||
| headers['Content-Length'] = str('0') |
Contributor
There was a problem hiding this comment.
Just wondering, isn't '0' enough?
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.
This pull request fixes the issue reported in https://issues.apache.org/jira/browse/LIBCLOUD-945.
We normalized header types inside the actual Connection class, but not inside the Connection class used by the tests. That's why some of the tests failed with newer version of
requestswhich doesn't automatically cast header values to strings anymore.