Skip to content

Commit 7775c69

Browse files
authored
Merge pull request #6 from cidrblock/main
CTRL-C
2 parents 84b22c4 + 942207b commit 7775c69

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/pytest_ansible_network_integration/__init__.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,6 @@ def _github_action_log(message: str) -> None:
196196
print(f"\n{message}", flush=True)
197197

198198

199-
@pytest.fixture(scope="session", autouse=True)
200-
def github_action_log() -> Callable[[str], None]:
201-
"""Log a message to GitHub Actions.
202-
203-
:returns: The log function
204-
"""
205-
return _github_action_log
206-
207-
208199
@pytest.fixture(scope="session", name="appliance_dhcp_address")
209200
def _appliance_dhcp_address(env_vars: Dict[str, str]) -> Generator[str, None, None]:
210201
"""Build the lab and collect the appliance DHCP address.
@@ -363,7 +354,8 @@ def github_log(request: pytest.FixtureRequest) -> Generator[None, None, None]:
363354
_github_action_log(f"::group::Run integration test: '{name}'")
364355
yield
365356

366-
if request.node.rep_setup.passed and request.node.rep_call.failed:
367-
_github_action_log(f"::error title=Integration test failure::{name}")
357+
if hasattr(request.node, "rep_call"):
358+
if request.node.rep_setup.passed and request.node.rep_call.failed:
359+
_github_action_log(f"::error title=Integration test failure::{name}")
368360

369361
_github_action_log("::endgroup::")

0 commit comments

Comments
 (0)