From 8f7f222e0dede6988ddd720eccc2bd1848455f8b Mon Sep 17 00:00:00 2001 From: Yaroslava Lukoyanova Date: Wed, 24 Apr 2024 00:00:19 +0300 Subject: [PATCH] [#213] Return response in complete_multipart_upload function --- src/frostfs_testlib/s3/aws_cli_client.py | 5 ++++- src/frostfs_testlib/s3/boto3_client.py | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/frostfs_testlib/s3/aws_cli_client.py b/src/frostfs_testlib/s3/aws_cli_client.py index 59ee740..2ed990c 100644 --- a/src/frostfs_testlib/s3/aws_cli_client.py +++ b/src/frostfs_testlib/s3/aws_cli_client.py @@ -693,7 +693,10 @@ class AwsCliClient(S3ClientWrapper): f"--key {key} --upload-id {upload_id} --multipart-upload file://{file_path} " f"--endpoint-url {self.s3gate_endpoint}" ) - self.local_shell.exec(cmd) + output = self.local_shell.exec(cmd).stdout + response = self._to_json(output) + + return response @reporter.step_deco("Put object lock configuration") def put_object_lock_configuration(self, bucket: str, configuration: dict) -> dict: diff --git a/src/frostfs_testlib/s3/boto3_client.py b/src/frostfs_testlib/s3/boto3_client.py index 2251efe..ff309b2 100644 --- a/src/frostfs_testlib/s3/boto3_client.py +++ b/src/frostfs_testlib/s3/boto3_client.py @@ -573,6 +573,8 @@ class Boto3ClientWrapper(S3ClientWrapper): ) log_command_execution("S3 Complete multipart upload", response) + return response + @reporter.step_deco("Put object retention") @report_error def put_object_retention(