From 73a9c95704523a5352a70357a35808cc582ab9d7 Mon Sep 17 00:00:00 2001 From: Andrey Berezin Date: Thu, 21 Sep 2023 19:49:31 +0300 Subject: [PATCH] Attach ACL wallets to allure Signed-off-by: Andrey Berezin --- pytest_tests/testsuites/acl/conftest.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pytest_tests/testsuites/acl/conftest.py b/pytest_tests/testsuites/acl/conftest.py index 124eaa57..31481362 100644 --- a/pytest_tests/testsuites/acl/conftest.py +++ b/pytest_tests/testsuites/acl/conftest.py @@ -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: