Skip to content

Commit

Permalink
AVX-55377: ensure pytest exits nonzero for result publishing failure (#3
Browse files Browse the repository at this point in the history
)

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
  • Loading branch information
tycho authored Jul 30, 2024
1 parent 376e8b7 commit 96cd6ca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pytest_testrail/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,11 @@ def add_results(self, testrun_id):
)
)

# Exit with a nonzero exit code to express that an error occurred
# during results publishing. The GitHub Actions runners need to be
# aware of it.
session.exitcode = pytest.ExitCode.INTERNAL_ERROR

def create_test_run(
self,
assign_user_id,
Expand Down

0 comments on commit 96cd6ca

Please sign in to comment.