[#330] Automation of PATCH method in GRPC #330

Merged
abereziny merged 1 commit from Kiriruso/frostfs-testcases:feature-patch-testsuite-part-one into master 2024-12-05 09:55:23 +00:00
Contributor

Signed-off-by: Kirill Sosnovskikh k.sosnovskikh@yadro.com

Signed-off-by: Kirill Sosnovskikh <k.sosnovskikh@yadro.com>
Kiriruso added 1 commit 2024-11-26 15:59:43 +00:00
[#330] Automation of PATCH method in GRPC
Some checks failed
DCO check / Commits Check (pull_request) Has been cancelled
ae34590ebe
Signed-off-by: Kirill Sosnovskikh <k.sosnovskikh@yadro.com>
requested reviews from i.niyazov, JuliaKovshova, abereziny, d.zayakin, anikeev-yadro, anurindm, ylukoyan 2024-11-26 15:59:43 +00:00
Kiriruso force-pushed feature-patch-testsuite-part-one from ae34590ebe to 1d19576dbb 2024-11-26 16:06:37 +00:00 Compare
i.niyazov reviewed 2024-11-27 06:45:14 +00:00
@ -0,0 +11,4 @@
from frostfs_testlib.testing.cluster_test_base import ClusterTestBase
from frostfs_testlib.utils.file_utils import generate_file, generate_file_with_content, get_file_content, get_file_hash
from workspace.frostfs_testcases.pytest_tests.helpers.container_creation import create_container_with_ape
from workspace.frostfs_testcases.pytest_tests.helpers.container_request import APE_EVERYONE_ALLOW_ALL, ContainerRequest
Member

please use relative imports, f.e. from ...helpers.container_request import APE_EVERYONE_ALLOW_ALL

please use relative imports, f.e. `from ...helpers.container_request import APE_EVERYONE_ALLOW_ALL`
Kiriruso marked this conversation as resolved
i.niyazov reviewed 2024-11-27 06:49:12 +00:00
@ -0,0 +22,4 @@
@pytest.mark.grpc_api
class TestObjectApiPatch(ClusterTestBase):
@allure.title("[Class] Create container with all operations allowed")
@pytest.fixture(scope="class")
Member

why is fixture scope 'class'? maybe scope='function'?

why is fixture scope 'class'? maybe` scope='function'`?
Member

I assume it's because we can use same container for any test in this class

I assume it's because we can use same container for any test in this class
Author
Contributor

yes, that's right, I don't want to create containers every time, since we are interested in working with objects

yes, that's right, I don't want to create containers every time, since we are interested in working with objects
Kiriruso marked this conversation as resolved
Kiriruso force-pushed feature-patch-testsuite-part-one from 1d19576dbb to 4dc7198ce0 2024-11-27 16:10:55 +00:00 Compare
abereziny reviewed 2024-11-28 12:56:24 +00:00
@ -0,0 +192,4 @@
simple_object_size: ObjectSize,
complex_object_size: ObjectSize,
):
simple_file = generate_file(simple_object_size.value)
Member

Add with reporter.step(f"Generate {simple_object_size} and {complex_object_size} objects")

Add `with reporter.step(f"Generate {simple_object_size} and {complex_object_size} objects")`
Kiriruso marked this conversation as resolved
abereziny reviewed 2024-11-28 13:06:12 +00:00
@ -0,0 +371,4 @@
payload_sizes: list[int | str],
):
patch_sizes = [self._get_bytes_relative_to_object(size, object_size.value) for size in payload_sizes]
patch_payloads = [generate_file(size) for size in patch_sizes]
Member

with reporter.step("Generate multiple test objects")

with reporter.step("Generate multiple test objects")
Kiriruso marked this conversation as resolved
Kiriruso force-pushed feature-patch-testsuite-part-one from 4dc7198ce0 to b60e84ee48 2024-12-03 00:26:29 +00:00 Compare
Kiriruso force-pushed feature-patch-testsuite-part-one from b60e84ee48 to 92aadcf9d3 2024-12-03 08:35:07 +00:00 Compare
d.zayakin approved these changes 2024-12-03 09:11:17 +00:00
abereziny approved these changes 2024-12-05 09:54:16 +00:00
removed review requests for i.niyazov, JuliaKovshova, anikeev-yadro, anurindm, ylukoyan 2024-12-05 09:55:17 +00:00
abereziny merged commit 5a0699dc78 into master 2024-12-05 09:55:23 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-testcases#330
No description provided.