From bceea1926ae6bc7aedf4e7acd3558a755cea1959 Mon Sep 17 00:00:00 2001 From: Vladimir Avdeev Date: Fri, 9 Dec 2022 14:32:12 +0300 Subject: [PATCH] Fix after remove obj size hardcode Signed-off-by: Vladimir Avdeev --- .../testsuites/acl/storage_group/test_storagegroup.py | 8 ++++++++ pytest_tests/testsuites/object/test_object_api.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pytest_tests/testsuites/acl/storage_group/test_storagegroup.py b/pytest_tests/testsuites/acl/storage_group/test_storagegroup.py index 497bd81..d3f2de2 100644 --- a/pytest_tests/testsuites/acl/storage_group/test_storagegroup.py +++ b/pytest_tests/testsuites/acl/storage_group/test_storagegroup.py @@ -101,6 +101,7 @@ class TestStorageGroup(ClusterTestBase): cid=cid, obj_list=objects, object_size=object_size, + max_object_size=max_object_size, ) @allure.title("Test Storage Group in Public Container") @@ -135,6 +136,7 @@ class TestStorageGroup(ClusterTestBase): cid=cid, obj_list=objects, object_size=object_size, + max_object_size=max_object_size, ) @allure.title("Test Storage Group in Read-Only Container") @@ -163,12 +165,14 @@ class TestStorageGroup(ClusterTestBase): cid=cid, obj_list=objects, object_size=object_size, + max_object_size=max_object_size, ) self.storagegroup_operations_by_system_ro_container( wallet=self.main_wallet, cid=cid, obj_list=objects, object_size=object_size, + max_object_size=max_object_size, ) @allure.title("Test Storage Group with Bearer Allow") @@ -350,6 +354,7 @@ class TestStorageGroup(ClusterTestBase): cid: str, obj_list: list, object_size: int, + max_object_size: int, ): storage_group = put_storagegroup( self.shell, self.cluster.default_rpc_endpoint, owner_wallet, cid, obj_list @@ -377,6 +382,7 @@ class TestStorageGroup(ClusterTestBase): gid=storage_group, obj_list=obj_list, object_size=object_size, + max_object_size=max_object_size, ) with pytest.raises(Exception, match=OBJECT_ACCESS_DENIED): delete_storagegroup( @@ -394,6 +400,7 @@ class TestStorageGroup(ClusterTestBase): cid: str, obj_list: list, object_size: int, + max_object_size: int, ): """ In this func we create a Storage Group on Inner Ring's key behalf @@ -450,6 +457,7 @@ class TestStorageGroup(ClusterTestBase): gid=storage_group, obj_list=obj_list, object_size=object_size, + max_object_size=max_object_size, wallet_config=ir_wallet_config, ) with pytest.raises(Exception, match=OBJECT_ACCESS_DENIED): diff --git a/pytest_tests/testsuites/object/test_object_api.py b/pytest_tests/testsuites/object/test_object_api.py index 02f2d14..c066f7a 100755 --- a/pytest_tests/testsuites/object/test_object_api.py +++ b/pytest_tests/testsuites/object/test_object_api.py @@ -72,7 +72,7 @@ def generate_ranges(file_size: int, max_object_size: int) -> list[(int, int)]: file_ranges_to_test.append((range_start, min(range_start + range_length, file_size))) - file_ranges_to_test.extend(STATIC_RANGES[file_size]) + file_ranges_to_test.extend(STATIC_RANGES.get(file_size, [])) return file_ranges_to_test