Fix after remove obj size hardcode

Signed-off-by: Vladimir Avdeev <v.avdeev@yadro.com>
This commit is contained in:
Vladimir Avdeev 2022-12-09 14:32:12 +03:00 committed by Vladimir Avdeev
parent 7ae0e8a21d
commit bceea1926a
2 changed files with 9 additions and 1 deletions

View file

@ -101,6 +101,7 @@ class TestStorageGroup(ClusterTestBase):
cid=cid, cid=cid,
obj_list=objects, obj_list=objects,
object_size=object_size, object_size=object_size,
max_object_size=max_object_size,
) )
@allure.title("Test Storage Group in Public Container") @allure.title("Test Storage Group in Public Container")
@ -135,6 +136,7 @@ class TestStorageGroup(ClusterTestBase):
cid=cid, cid=cid,
obj_list=objects, obj_list=objects,
object_size=object_size, object_size=object_size,
max_object_size=max_object_size,
) )
@allure.title("Test Storage Group in Read-Only Container") @allure.title("Test Storage Group in Read-Only Container")
@ -163,12 +165,14 @@ class TestStorageGroup(ClusterTestBase):
cid=cid, cid=cid,
obj_list=objects, obj_list=objects,
object_size=object_size, object_size=object_size,
max_object_size=max_object_size,
) )
self.storagegroup_operations_by_system_ro_container( self.storagegroup_operations_by_system_ro_container(
wallet=self.main_wallet, wallet=self.main_wallet,
cid=cid, cid=cid,
obj_list=objects, obj_list=objects,
object_size=object_size, object_size=object_size,
max_object_size=max_object_size,
) )
@allure.title("Test Storage Group with Bearer Allow") @allure.title("Test Storage Group with Bearer Allow")
@ -350,6 +354,7 @@ class TestStorageGroup(ClusterTestBase):
cid: str, cid: str,
obj_list: list, obj_list: list,
object_size: int, object_size: int,
max_object_size: int,
): ):
storage_group = put_storagegroup( storage_group = put_storagegroup(
self.shell, self.cluster.default_rpc_endpoint, owner_wallet, cid, obj_list self.shell, self.cluster.default_rpc_endpoint, owner_wallet, cid, obj_list
@ -377,6 +382,7 @@ class TestStorageGroup(ClusterTestBase):
gid=storage_group, gid=storage_group,
obj_list=obj_list, obj_list=obj_list,
object_size=object_size, object_size=object_size,
max_object_size=max_object_size,
) )
with pytest.raises(Exception, match=OBJECT_ACCESS_DENIED): with pytest.raises(Exception, match=OBJECT_ACCESS_DENIED):
delete_storagegroup( delete_storagegroup(
@ -394,6 +400,7 @@ class TestStorageGroup(ClusterTestBase):
cid: str, cid: str,
obj_list: list, obj_list: list,
object_size: int, object_size: int,
max_object_size: int,
): ):
""" """
In this func we create a Storage Group on Inner Ring's key behalf In this func we create a Storage Group on Inner Ring's key behalf
@ -450,6 +457,7 @@ class TestStorageGroup(ClusterTestBase):
gid=storage_group, gid=storage_group,
obj_list=obj_list, obj_list=obj_list,
object_size=object_size, object_size=object_size,
max_object_size=max_object_size,
wallet_config=ir_wallet_config, wallet_config=ir_wallet_config,
) )
with pytest.raises(Exception, match=OBJECT_ACCESS_DENIED): with pytest.raises(Exception, match=OBJECT_ACCESS_DENIED):

View file

@ -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.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 return file_ranges_to_test