Rename bearer_token to bearer

Signed-off-by: Vladimir Avdeev <v.avdeev@yadro.com>
This commit is contained in:
Vladimir Avdeev 2022-10-18 13:39:39 +03:00 committed by Vladimir Avdeev
parent 7d54641e54
commit 7fcbdb6c34
8 changed files with 53 additions and 53 deletions

View file

@ -165,19 +165,19 @@ class TestStorageGroup:
obj_list: list,
object_size: int,
shell: Shell,
bearer_token: Optional[str] = None,
bearer: Optional[str] = None,
):
"""
This func verifies if the Object's owner is allowed to
Put, List, Get and Delete the Storage Group which contains
the Object.
"""
storage_group = put_storagegroup(wallet, cid, obj_list, bearer_token)
verify_list_storage_group(wallet, cid, storage_group, bearer_token)
storage_group = put_storagegroup(wallet, cid, obj_list, bearer)
verify_list_storage_group(wallet, cid, storage_group, bearer)
verify_get_storage_group(
wallet, cid, storage_group, obj_list, object_size, shell, bearer_token
wallet, cid, storage_group, obj_list, object_size, shell, bearer
)
delete_storagegroup(wallet, cid, storage_group, bearer_token)
delete_storagegroup(wallet, cid, storage_group, bearer)
@staticmethod
@allure.step("Run Storage Group Operations And Expect Failure")

View file

@ -49,7 +49,7 @@ class TestACLBearer:
wait_for_cache_expired()
with allure.step(f"Create bearer token for {role.value} with all operations allowed"):
bearer_token = form_bearertoken_file(
bearer = form_bearertoken_file(
user_wallet.wallet_path,
cid,
[
@ -79,7 +79,7 @@ class TestACLBearer:
cid,
objects_oids.pop(),
file_path,
bearer=bearer_token,
bearer=bearer,
wallet_config=deny_wallet.config_path,
shell=client_shell,
)
@ -179,7 +179,7 @@ class TestACLBearer:
)
with allure.step("Check rule consistency using bearer token"):
bearer_token_user = form_bearertoken_file(
bearer_user = form_bearertoken_file(
user_wallet.wallet_path,
cid,
[
@ -189,7 +189,7 @@ class TestACLBearer:
shell=client_shell,
)
bearer_token_other = form_bearertoken_file(
bearer_other = form_bearertoken_file(
user_wallet.wallet_path,
cid,
[
@ -205,7 +205,7 @@ class TestACLBearer:
objects_oids.pop(),
file_path,
deny_operations=deny_map_with_bearer[EACLRole.USER],
bearer=bearer_token_user,
bearer=bearer_user,
wallet_config=user_wallet.config_path,
shell=client_shell,
)
@ -215,7 +215,7 @@ class TestACLBearer:
objects_oids.pop(),
file_path,
deny_operations=deny_map_with_bearer[EACLRole.OTHERS],
bearer=bearer_token_other,
bearer=bearer_other,
wallet_config=other_wallet.config_path,
shell=client_shell,
)

View file

@ -193,7 +193,7 @@ class TestEACLFilters:
"Check other has full access when sending request "
"with denied headers and using bearer token"
):
bearer_token_other = form_bearertoken_file(
bearer_other = form_bearertoken_file(
user_wallet.wallet_path,
cid,
[
@ -209,7 +209,7 @@ class TestEACLFilters:
file_path,
shell=client_shell,
xhdr=deny_headers,
bearer=bearer_token_other,
bearer=bearer_other,
)
@pytest.mark.parametrize(
@ -308,7 +308,7 @@ class TestEACLFilters:
with allure.step(
"Check other have access to objects with deny attribute and using bearer token"
):
bearer_token_other = form_bearertoken_file(
bearer_other = form_bearertoken_file(
user_wallet.wallet_path,
cid,
[
@ -328,7 +328,7 @@ class TestEACLFilters:
file_path,
shell=client_shell,
xhdr=xhdr,
bearer=bearer_token_other,
bearer=bearer_other,
)
allow_attribute = (
@ -360,7 +360,7 @@ class TestEACLFilters:
with allure.step(
"Check other can PUT objects with denied attribute and using bearer token"
):
bearer_token_other_for_put = form_bearertoken_file(
bearer_other_for_put = form_bearertoken_file(
user_wallet.wallet_path,
cid,
[
@ -378,7 +378,7 @@ class TestEACLFilters:
file_path,
shell=client_shell,
attributes=deny_attribute,
bearer=bearer_token_other_for_put,
bearer=bearer_other_for_put,
)
@pytest.mark.parametrize(
@ -451,7 +451,7 @@ class TestEACLFilters:
with allure.step(
"Check other can get and put objects without attributes and using bearer token"
):
bearer_token_other = form_bearertoken_file(
bearer_other = form_bearertoken_file(
user_wallet.wallet_path,
cid,
[
@ -469,7 +469,7 @@ class TestEACLFilters:
cid,
objects_without_header[0],
shell=client_shell,
bearer=bearer_token_other,
bearer=bearer_other,
)
assert can_get_object(
other_wallet.wallet_path,
@ -477,14 +477,14 @@ class TestEACLFilters:
objects_without_header[0],
file_path,
shell=client_shell,
bearer=bearer_token_other,
bearer=bearer_other,
)
assert can_put_object(
other_wallet.wallet_path,
cid,
file_path,
shell=client_shell,
bearer=bearer_token_other,
bearer=bearer_other,
)
with allure.step(f"Check other can get objects with attributes matching the filter"):
@ -523,7 +523,7 @@ class TestEACLFilters:
):
oid = deny_objects.pop()
assert can_get_head_object(
other_wallet.wallet_path, cid, oid, shell=client_shell, bearer=bearer_token_other
other_wallet.wallet_path, cid, oid, shell=client_shell, bearer=bearer_other
)
assert can_get_object(
other_wallet.wallet_path,
@ -531,7 +531,7 @@ class TestEACLFilters:
oid,
file_path,
shell=client_shell,
bearer=bearer_token_other,
bearer=bearer_other,
)
assert can_put_object(
other_wallet.wallet_path,
@ -539,5 +539,5 @@ class TestEACLFilters:
file_path,
shell=client_shell,
attributes=deny_attribute,
bearer=bearer_token_other,
bearer=bearer_other,
)