Repository navigation
Commit c2192eb
committed
fix: isolate the real commit-check subprocess from repo and org config
The previous commit worked around one symptom (no git identity ->
commit-check falls back to HEAD's author -> ignore_authors matches a
bot -> the piped message check silently skips) by giving the test
step a git identity in CI. That leaves TestRealCommitCheckBinary
coupled to more than it should be about: it still runs from this
repo's checkout, so it still picks up commit-check.toml, which still
inherits the org's shared config over the network on every test run,
and it still resolves ignore_authors and every other repo-level
setting -- none of which the test's own docstring says it is about.
Run it from an isolated, empty directory instead. commit-check reads
cchk.toml/commit-check.toml only from its cwd (no upward search), so
an empty cwd gets the built-in defaults on their own: no config file,
no network fetch, no ignore_authors, and -- since git commands run
from a non-repository directory return nothing -- no HEAD author to
fall back to either. The test now only exercises what it says it
exercises: the CLI's JSON contract for a piped message.
This supersedes the git-identity workaround, which is no longer
needed and is reverted here.1 parent 8986da9 commit c2192eb
4 files changed
Lines changed: 28 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | 21 | | |
29 | 22 | | |
30 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 34 | | |
47 | 35 | | |
48 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | | - | |
| 514 | + | |
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
| |||
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
529 | 535 | | |
530 | 536 | | |
531 | 537 | | |
| |||
536 | 542 | | |
537 | 543 | | |
538 | 544 | | |
| 545 | + | |
539 | 546 | | |
540 | 547 | | |
541 | 548 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2800 | 2800 | | |
2801 | 2801 | | |
2802 | 2802 | | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
2803 | 2815 | | |
2804 | 2816 | | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
2805 | 2822 | | |
2806 | | - | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
2807 | 2826 | | |
2808 | 2827 | | |
2809 | 2828 | | |
| |||
0 commit comments