Commit 73c16dd
fix(test): give four get edge-case fixtures a real file so #158's guard passes
Merged PR #158 (5d7eb6f, "fix(get,scan): retain patch-added new files;
guard empty patch records") added a correct guardrail: a fetched patch
view whose `files_for_manifest` map is EMPTY is now an exit-1 failure
("patch has no applicable files") instead of a silent `applied:1`. But
#158 only touched get.rs and left four tests in get_edge_cases_e2e.rs
carrying stale `"files": {}` patch-view fixtures that still assert the
`get` succeeds (exit 0). Those four now fail on main:
- get_with_id_flag_selects_specific_patch
- get_uuid_returns_paid_patch_with_token_succeeds
- get_on_vendored_purl_warns_about_uuid_drift
- get_uuid_replacing_existing_manifest_entry_reports_updated
Their real concern is selection / paid-token / drift-warning /
manifest-replacement logic, not "a patch with zero files" — the empty
map was only a lazy stand-in. Give each view fixture one recordable
net-new file (all-zero `beforeHash`, real git-blob `afterHash` via the
shared `common::git_sha256` oracle, matching base64 `blobContent`),
modeled on the passing `get_invariants::patch_response_json` fixture, so
`files_for_manifest` is non-empty and the guard is satisfied. Every
existing assertion (found==1, selected UUID, drift warning, `updated`
reporting + `oldUuid`, manifest move) is unchanged. The guardrail in
get.rs is untouched.
get_edge_cases_e2e now 22/22; lib (350) and get_invariants /
get_update_summary (15) unaffected.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 4f58eec commit 73c16dd
1 file changed
Lines changed: 29 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
35 | 60 | | |
36 | 61 | | |
37 | 62 | | |
| |||
100 | 125 | | |
101 | 126 | | |
102 | 127 | | |
103 | | - | |
| 128 | + | |
104 | 129 | | |
105 | 130 | | |
106 | 131 | | |
| |||
405 | 430 | | |
406 | 431 | | |
407 | 432 | | |
408 | | - | |
| 433 | + | |
409 | 434 | | |
410 | 435 | | |
411 | 436 | | |
| |||
496 | 521 | | |
497 | 522 | | |
498 | 523 | | |
499 | | - | |
| 524 | + | |
500 | 525 | | |
501 | 526 | | |
502 | 527 | | |
| |||
583 | 608 | | |
584 | 609 | | |
585 | 610 | | |
586 | | - | |
| 611 | + | |
587 | 612 | | |
588 | 613 | | |
589 | 614 | | |
| |||
0 commit comments