Skip to content

Commit

Permalink
tests: allow non sequential multipart uploads
Browse files Browse the repository at this point in the history
closes #902

Signed-off-by: Evgeniy Zayats <[email protected]>
  • Loading branch information
Evgeniy Zayats committed Dec 5, 2024
1 parent a5ff395 commit 5f7bc04
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pytest_tests/tests/s3/test_s3_multipart.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,7 @@ def test_s3_object_multipart_non_sequential(self):
with allure.step("Upload second part"):
upload_id = s3_object.create_multipart_upload_s3(self.s3_client, bucket, object_key)
uploads = s3_object.list_multipart_uploads_s3(self.s3_client, bucket)
with pytest.raises(
Exception,
match=".*A conflicting conditional operation is currently in progress against this resource.*",
):
s3_object.upload_part_s3(self.s3_client, bucket, object_key, upload_id, 2, part_files[0])
s3_object.upload_part_s3(self.s3_client, bucket, object_key, upload_id, 2, part_files[0])

with allure.step("Upload first part"):
etag = s3_object.upload_part_s3(self.s3_client, bucket, object_key, upload_id, 1, part_files[0])
Expand All @@ -79,7 +75,7 @@ def test_s3_object_multipart_non_sequential(self):
assert len(got_parts) == 1, f"Expected {1} parts, got\n{got_parts}"

with allure.step("Upload last parts"):
for part_id, file_path in enumerate(part_files[1:], start=2):
for part_id, file_path in enumerate(part_files[2:], start=3):
etag = s3_object.upload_part_s3(self.s3_client, bucket, object_key, upload_id, part_id, file_path)
parts.append((part_id, etag))
got_parts = s3_object.list_parts_s3(self.s3_client, bucket, object_key, upload_id)
Expand Down

0 comments on commit 5f7bc04

Please sign in to comment.