-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Big objects #51
base: main
Are you sure you want to change the base?
Big objects #51
Conversation
|
||
# Generate Files | ||
/tmp_files/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
o que vc acha de usar o path /tmp
do próprio linux? ao invés de uma pasta local no projeto.
|
||
@pytest.mark.slow | ||
@pytest.mark.big_objects | ||
def test_multipart_download(s3_client, fixture_bucket_with_name, fixture_upload_multipart_file, params): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vamos fazer este teste ser executável via jupyter notebook? acho que da para pegar o exemplo de como estão outros, mas posso te mostrar na reunião também
# The test was successful only if the size on the bucket size is equal to the ones uploaded and downloaded | ||
assert downloaded_file_size == uploaded_file_size, f"Downloaded size doesn't match: {downloaded_file_size} with Upload size: {uploaded_file_size}" | ||
except Exception as e: | ||
logging.error(f"Error uploading object {object_key}: {e}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acho que é downloading nesta msg né?
@@ -0,0 +1,88 @@ | |||
import pytest | |||
import logging | |||
from utils.utils import create_big_file, convert_unit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acho que convert_unit não é usada neste arquivo
|
||
@pytest.mark.parametrize( | ||
'params, fixture_upload_multipart_file', | ||
[(p, p) for p in upload_params], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
voce passa os mesmos parametros tanto para a fixture (indirect) quanto para o teste, que usa a fixture. Será que não daria para usar só a fixture? Faz ela retornar as 3 coisas (path, size, key) ao inves de somente o size
Test to download a big object to an S3 bucket using multipart download | ||
:param s3_client: fixture of boto3 s3 client | ||
:param fixture_bucket_with_name: fixture to create a bucket with a unique name | ||
:param params: dict: 'file_path': str, 'file_size': dict, 'object_key': str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nao esquece de ajustar aqui caso aceite a sugestão anterior
# Checking if the object was uploaded | ||
object_size = s3_client.get_object(Bucket=bucket_name, Key=object_key).get('ContentLength', 0) | ||
|
||
return object_size #return int of size in bytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aqui o que eu comentei de retornar os 3 dados
precisa de um rebase |
No description provided.