Commit 786448f
committed
backup: #904 v17 - add buf.Len() == 0 assertions to Redis rejection tests
Claude v16 observation (non-blocking but worth folding in): the two
v16 rejection tests TestEncodeSnapshotRedisRejectsNonZeroDB and
TestEncodeSnapshotRedisRejectsMultipleDBs pass a *bytes.Buffer to
EncodeSnapshot but never assert it stays empty on rejection.
All five prior rejection tests consistently include the assertion:
- TestEncodeSnapshotRejectsMissingInputRoot
- TestEncodeSnapshotRejectsLowManifestFloor
- TestEncodeSnapshotRejectsDynamoDBJSONLLayout
- TestEncodeSnapshotRejectsZeroAdapterSet
- TestEncodeSnapshotMarksAdapterDataErrors
Adding the same `if buf.Len() != 0 { t.Errorf(...) }` block to both
new tests keeps the convention consistent and pins the
no-bytes-on-rejection invariant explicitly.
No behavior change; tests + lint green.1 parent b52a688 commit 786448f
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
501 | 504 | | |
502 | 505 | | |
503 | 506 | | |
| |||
524 | 527 | | |
525 | 528 | | |
526 | 529 | | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
527 | 533 | | |
528 | 534 | | |
529 | 535 | | |
| |||
0 commit comments