|
Option C Tools
|
Classes | |
| class | TestExitCodes |
| class | TestSecretsNonBypassable |
| class | TestForce |
| class | TestNoVerify |
| class | TestProtectedBranch |
| class | TestLargeFile |
| class | TestConventionalMessage |
| class | TestAuditTrail |
| class | TestJsonOutput |
| class | TestRepeatedMessage |
Functions | |
| bool | _git_available () |
| subprocess.CompletedProcess | _run_commit (Path root, *str extra_args) |
| dict | _run_commit_json (Path root, *str extra_args) |
| dict|None | _latest_audit_record (Path root) |
Purpose
-------
Integration tests for ``oct git commit`` (Phase 4D — G-D3, G-D4, G-D6, G-D7).
Responsibilities
----------------
- Verify exit codes 0-4 for commit scenarios.
- Verify the non-bypassable secrets invariant (G-D4).
- Verify --force, --no-verify, --json flags.
- Verify protected-branch guards (G-D7).
- Verify large-file advisory warnings (G-D6).
- Verify audit trail.
Diagnostics
-----------
Domain: GIT-TESTS
Levels:
L2 — test lifecycle
L3 — assertion details
L4 — deep tracing
Contracts
---------
- All tests use subprocess invocation (same pattern as test_git_check.py).
- All tests use tmp_path fixtures so they are automatically cleaned up.
|
protected |
Definition at line 49 of file test_git_commit.py.
|
protected |
Read the last JSONL line from the newest audit file.
Definition at line 69 of file test_git_commit.py.
|
protected |
Run ``oct git commit`` in a subprocess.
Definition at line 53 of file test_git_commit.py.
|
protected |
Run ``oct git commit --json`` and parse JSON output.
Definition at line 63 of file test_git_commit.py.