mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-08-19 13:46:58 +00:00
Existing range-read coverage in test/s3/sse was scoped to small (<= 1MB)
single-chunk objects, with one ad-hoc range case per SSE mode and one
129-byte boundary-crossing case in TestSSEMultipartUploadIntegration.
Nothing exercised:
- Range reads on single-PUT objects whose content crosses the 8MB
internal chunk boundary (medium size class).
- Range reads on multipart objects whose parts each span multiple
internal chunks (large size class) -- the shape #8908 originally
surfaced for full-object GETs and the most likely site of any
future regression in per-chunk IV / PartOffset plumbing for
partial reads.
- A consistent range-pattern set applied uniformly across SSE modes,
so any divergence between modes (SSE-C uses random IV + PartOffset;
SSE-S3/KMS use base IV + offset) is comparable at a glance.
TestSSERangeReadCoverageMatrix introduces a parameterized matrix:
modes: no_sse, sse_c, sse_kms, sse_s3
sizes: small (256KB single chunk),
medium (12MB single PUT crossing one internal boundary),
large (5x9MB multipart, ~10 internal chunks, every part
itself spans an 8MB boundary)
ranges: single byte at 0, prefix 512B, single byte at last,
suffix bytes=-100, open-ended bytes=N-, whole object,
AES-block boundary 15-31, mid straddling one internal
boundary (medium+large), mid spanning many internal
boundaries (large only)
Per case it asserts: body bytes equal the expected slice, Content-Length
matches the range length, Content-Range matches start-end/total, and the
SSE response headers match the mode.
The sse_kms branch probes once with a 1-byte SSE-KMS PUT and t.Skip's
the remaining sse_kms subtests with a clear reason if the local server
has no KMS provider configured -- the default `weed mini` setup lacks
one; the Makefile target `test-with-kms` provides one via OpenBao. Other
modes always run.
Verified locally: 75 subtests pass under no_sse / sse_c / sse_s3 against
weed mini, sse_kms cleanly skipped.