Attach ACL wallets to allure

Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
master
Andrey Berezin 2023-09-21 19:49:31 +03:00
parent d38e05c100
commit 73a9c95704
1 changed files with 13 additions and 1 deletions

View File

@ -54,7 +54,7 @@ def wallets(default_wallet: str, temp_directory: str, cluster: Cluster) -> Walle
storage_wallet_path = storage_node.get_wallet_path()
storage_wallet_config = storage_node.get_wallet_config_path()
yield Wallets(
wallets_collection = Wallets(
wallets={
EACLRole.USER: [Wallet(wallet_path=default_wallet, config_path=DEFAULT_WALLET_CONFIG)],
EACLRole.OTHERS: [
@ -68,6 +68,18 @@ def wallets(default_wallet: str, temp_directory: str, cluster: Cluster) -> Walle
}
)
for role, wallets in wallets_collection.wallets.items():
if role == EACLRole.SYSTEM:
continue
for wallet in wallets:
allure.attach.file(
wallet.wallet_path,
os.path.basename(wallet.wallet_path),
allure.attachment_type.JSON,
)
return wallets_collection
@pytest.fixture()
def file_path(object_size: ObjectSize) -> str: