Skip to content

Commit a8eacb8

Browse files
committed
ci: print EC2 AMI in the pytest report header
1 parent 80b4cb4 commit a8eacb8

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
@@ -67,6 +67,11 @@ def pytest_addoption(parser):
6767
)
6868

6969

70+
def pytest_report_header():
71+
"""Pytest hook to print relevant metadata in the logs"""
72+
return f"EC2 AMI: {global_props.ami}"
73+
74+
7075
@pytest.hookimpl(wrapper=True, tryfirst=True)
7176
def pytest_runtest_makereport(item, call): # pylint:disable=unused-argument
7277
"""Plugin to get test results in fixtures

0 commit comments

Comments
 (0)