You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: cover commit truncation, exit code remap, and Buildkite formatting
Adds and updates unit tests for the v2.3.0 behavior changes:
tests/unit/test_cli_config.py
- Commit message under 200 chars passes through unchanged
- Commit message over 200 chars truncated to exactly 200
- Quote-strip runs BEFORE truncation (250-char inner -> 200)
- --exit-code-on-api-error defaults to 3
- --exit-code-on-api-error accepts custom and zero values
tests/unit/test_socketcli.py
- APIFailure -> exit 3 by default
- APIFailure -> exit 3 EVEN with --disable-blocking (breaking change for
2.3.0: --disable-blocking only affects security findings now)
- RequestTimeoutExceeded -> exit 3 by default
- --exit-code-on-api-error 100 remaps timeout to exit 100
- --exit-code-on-api-error 0 swallows infrastructure errors
- Generic RuntimeError uses exit_code_on_api_error too
- _emit_infrastructure_error:
* BUILDKITE=true emits "^^^ +++" and "--- ⚠️" markers (stdout)
plus a soft_fail hint (logger)
* Without BUILDKITE, no markers and no soft_fail hint
* Traceback only included when include_traceback=True
Replaces the old test_cli_honors_disable_blocking_for_api_failures test
which encoded the pre-2.3.0 coupling between --disable-blocking and infra
errors -- that coupling is gone by design.
Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
0 commit comments