From db2717e971d7ca6199640504d19ca3ec47508b29 Mon Sep 17 00:00:00 2001 From: Evgeniy Zayats Date: Fri, 19 Jan 2024 17:37:27 -0500 Subject: [PATCH] Set MaxObjectSize suitable for s3 multipart and http tests Signed-off-by: Evgeniy Zayats --- dynamic_env_pytest_tests/tests/conftest.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/dynamic_env_pytest_tests/tests/conftest.py b/dynamic_env_pytest_tests/tests/conftest.py index 038caed9a..dbc6319e6 100644 --- a/dynamic_env_pytest_tests/tests/conftest.py +++ b/dynamic_env_pytest_tests/tests/conftest.py @@ -1,6 +1,7 @@ import os import shutil import uuid +import time from typing import Optional import allure @@ -36,8 +37,9 @@ def neofs_env(request): neofs_env.neofs_adm().morph.set_config( rpc_endpoint=f"http://{neofs_env.morph_rpc}", alphabet_wallets=neofs_env.alphabet_wallets_dir, - post_data=f"ContainerFee=0 ContainerAliasFee=0 MaxObjectSize=1024", + post_data=f"ContainerFee=0 ContainerAliasFee=0 MaxObjectSize=524288", ) + time.sleep(30) yield neofs_env @@ -46,6 +48,19 @@ def neofs_env(request): else: if not request.config.getoption("--load-env"): neofs_env.kill() + + logs_path = os.path.join(os.getcwd(), ASSETS_DIR, "logs") + os.makedirs(logs_path, exist_ok=True) + + shutil.copyfile(neofs_env.s3_gw.stderr, f"{logs_path}/s3_gw_log.txt") + shutil.copyfile(neofs_env.http_gw.stderr, f"{logs_path}/http_gw_log.txt") + for idx, ir in enumerate(neofs_env.inner_ring_nodes): + shutil.copyfile(ir.stderr, f"{logs_path}/ir_{idx}_log.txt") + for idx, sn in enumerate(neofs_env.storage_nodes): + shutil.copyfile(sn.stderr, f"{logs_path}/sn_{idx}_log.txt") + + logs_zip_file_path = shutil.make_archive("neofs_logs", "zip", logs_path) + allure.attach.file(logs_zip_file_path, name="neofs logs", extension="zip") @pytest.fixture(scope="session")