chore: attach logs for failed test and remove squish config from allure

This commit is contained in:
Valentina Novgorodtceva 2024-03-12 16:17:20 +07:00 committed by Anastasiya
parent 3f714531ad
commit 3d6a1ee68b
3 changed files with 3 additions and 5 deletions

View File

@ -42,7 +42,8 @@ def setup_session_scope(
def setup_function_scope(
caplog,
generate_test_data,
check_result
check_result,
application_logs
):
# FIXME: broken due to KeyError: <_pytest.stash.StashKey object at 0x7fd1ba6d78c0>
# caplog.set_level(configs.LOG_LEVEL)

View File

@ -24,7 +24,7 @@ def application_logs():
yield
if configs.testpath.STATUS_DATA.exists():
for app_data in configs.testpath.STATUS_DATA.iterdir():
for log in (app_data / 'logs').iterdir():
for log in (app_data / 'logs').glob('*.log'):
allure.attach.file(log, name=str(log.name), attachment_type=allure.attachment_type.TEXT)

View File

@ -22,6 +22,3 @@ def start_squish_server():
finally:
LOG.info('Stopping Squish Server...')
server.stop()
if server.config.exists():
allure.attach.file(str(server.config), 'Squish server config')
server.config.unlink()