chore: attach logs for failed test and remove squish config from allure
This commit is contained in:
parent
0150a0889a
commit
a1e4591bc4
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue