Actions
Issue #9463
closedThe chunked upload test fails in the dev environment
Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
Installer - Moved to GitHub issues
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Dev Environment
Sprint:
Quarter:
Description
The chunked upload test in pulpcore/tests/functional/api/test_upload.py
fails on the dev environment or when the test is run against a pulp server using nginx. This is because the max request size by default in nginx is 1M.
________________________________________________________________ ChunkedUploadTestCase.test_create_artifact_passing_checksum _________________________________________________________________
self = <pulpcore.tests.functional.api.test_upload.ChunkedUploadTestCase testMethod=test_create_artifact_passing_checksum>
def test_create_artifact_passing_checksum(self):
"""Test creation of artifact using upload of files in chunks passing checksum."""
upload_request = self.client.post(UPLOAD_PATH, {"size": self.size_file})
for data in self.chunked_data:
import pdb; pdb.set_trace()
> self.client.put(
upload_request["pulp_href"],
data={"sha256": hashlib.sha256(data[0]).hexdigest()},
files={"file": data[0]},
headers=data[1],
)
pulpcore/tests/functional/api/test_upload.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../pulp-smash/pulp_smash/api.py:597: in put
return self.request("PUT", url, **kwargs)
../pulp-smash/pulp_smash/api.py:629: in request
response = self.response_handler(self, requests.request(method, **request_kwargs))
../pulp-smash/pulp_smash/api.py:284: in smart_handler
response = safe_handler(client, response)
../pulp-smash/pulp_smash/api.py:148: in safe_handler
response.raise_for_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Response [413]>
def raise_for_status(self):
"""Raises :class:`HTTPError`, if one occurred."""
http_error_msg = ''
if isinstance(self.reason, bytes):
# We attempt to decode utf-8 first because some servers
# choose to localize their reason strings. If the string
# isn't utf-8, we fall back to iso-8859-1 for all other
# encodings. (See PR #3538)
try:
reason = self.reason.decode('utf-8')
except UnicodeDecodeError:
reason = self.reason.decode('iso-8859-1')
else:
reason = self.reason
if 400 <= self.status_code < 500:
http_error_msg = u'%s Client Error: %s for url: %s' % (self.status_code, reason, self.url)
elif 500 <= self.status_code < 600:
http_error_msg = u'%s Server Error: %s for url: %s' % (self.status_code, reason, self.url)
if http_error_msg:
> raise HTTPError(http_error_msg, response=self)
E requests.exceptions.HTTPError: 413 Client Error: Request Entity Too Large for url: http://pulp3-source-fedora.crake.example.com:80/pulp/api/v3/uploads/a222e7e9-2e4e-4119-8d7a-d54
2a319624c/
/usr/local/lib/pulp/lib64/python3.9/site-packages/requests/models.py:943: HTTPError
Actions
Set
client_max_body_size
to 10m for dev environmentscloses #9463