Fix get_range usage in acl tests

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
develop
Vladimir Domnich 2022-08-03 18:50:01 +03:00
parent eff4b032a5
commit 448570afa0
2 changed files with 5 additions and 5 deletions

View File

@ -91,7 +91,7 @@ class TestACL:
head_object(wallet, cid, oid)
with pytest.raises(Exception, match=err_pattern):
get_range(wallet, cid, oid, file_path='s_get_range', bearer='', range_cut='0:10')
get_range(wallet, cid, oid, bearer='', range_cut='0:10')
with pytest.raises(Exception, match=err_pattern):
get_range_hash(wallet, cid, oid, bearer_token='', range_cut='0:10')
@ -110,7 +110,7 @@ class TestACL:
assert get_file_hash(got_file) == get_file_hash(file_name), 'Expected hashes are the same'
head_object(current_wallet, cid, oid)
get_range(current_wallet, cid, oid, file_path='s_get_range', bearer='', range_cut='0:10')
get_range(current_wallet, cid, oid, bearer='', range_cut='0:10')
get_range_hash(current_wallet, cid, oid, bearer_token='', range_cut='0:10')
search_object(current_wallet, cid)

View File

@ -153,8 +153,8 @@ def delete_object(wallet: str, cid: str, oid: str, bearer: str = "", wallet_conf
@keyword('Get Range')
def get_range(wallet: str, cid: str, oid: str, range_cut: str,
wallet_config: str = WALLET_CONFIG, bearer: str = "", options: str = ""):
def get_range(wallet: str, cid: str, oid: str, range_cut: str, wallet_config: str = WALLET_CONFIG,
bearer: str = "", options: str = ""):
"""
GETRANGE an Object.
@ -167,7 +167,7 @@ def get_range(wallet: str, cid: str, oid: str, range_cut: str,
wallet_config(optional, str): path to the wallet config
options (optional, str): any options which `neofs-cli object range` accepts
Returns:
(void)
(str, bytes) - path to the file with range content and content of this file as bytes
"""
range_file = f"{ASSETS_DIR}/{uuid.uuid4()}"
cmd = (