Skip to content

Commit e70bfab

Browse files
committed
ci: print EC2 AMI in the pytest report header
This is useful for validation tasks and when troubleshooting. Signed-off-by: Pablo Barbáchano <[email protected]>
1 parent 5b706ed commit e70bfab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ def pytest_addoption(parser):
7676
)
7777

7878

79+
def pytest_report_header():
80+
"""Pytest hook to print relevant metadata in the logs"""
81+
return f"EC2 AMI: {global_props.ami}"
82+
83+
7984
@pytest.hookimpl(wrapper=True, tryfirst=True)
8085
def pytest_runtest_makereport(item, call): # pylint:disable=unused-argument
8186
"""Plugin to get test results in fixtures

0 commit comments

Comments
 (0)