Skip to content

Commit

Permalink
Fix failing CI tests and bugfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
aemous committed Sep 24, 2024
1 parent f2b4cb0 commit 90dfb1f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changes/next-release/bugfix-copy-81213.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "bugfix",
"category": "copy",
"description": "Added support for ``ChecksumAlgorithm`` when uploading copy data in parts."
}
4 changes: 3 additions & 1 deletion awscli/customizations/s3/subcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1286,11 +1286,13 @@ def _validate_path_args(self):
if self._should_emit_validate_s3_paths_warning():
self._emit_validate_s3_paths_warning()

checksum_algorithm_allowed_paths = ['locals3', 's3s3'] if self.cmd in ['cp', 'sync'] else ['locals3']

if params.get('checksum_algorithm'):
self._raise_if_paths_type_incorrect_for_param(
CHECKSUM_ALGORITHM['name'],
params['paths_type'],
['locals3', 's3s3'])
checksum_algorithm_allowed_paths)
if params.get('checksum_mode'):
self._raise_if_paths_type_incorrect_for_param(
CHECKSUM_MODE['name'],
Expand Down
5 changes: 0 additions & 5 deletions tests/unit/customizations/s3/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,11 +663,6 @@ def test_put_object(self, cli_params):
RequestParamsMapper.map_put_object_params(request_params, cli_params)
assert request_params == {'ChecksumAlgorithm': 'CRC32'}

def test_upload_part(self, cli_params):
request_params = {}
RequestParamsMapper.map_upload_part_params(request_params, cli_params)
assert request_params == {'ChecksumAlgorithm': 'CRC32'}


class TestRequestParamsMapperChecksumMode:
@pytest.fixture
Expand Down

0 comments on commit 90dfb1f

Please sign in to comment.