feat(12-01): record multipart uploads and match Winter upload URLs

- attach.PublicURL and (*File).URL build Winter File::getPath() URLs; the
  thumbnailer decodes webp via golang.org/x/image v0.46.0 and checks the
  image size from the header before decoding
- tide requests carry multipart parts (files beside the fixture pinned by
  sha256) encoded with the fixed MultipartBoundary, so PHP and Go receive
  byte-identical bodies
- tide masks the random partition, disk name and file id of url/thumb_url
  upload URLs while still diffing prefix, size, mode and extension, and
  NormalizePublications masks Carbon dates in the published album
This commit is contained in:
Jakub Zych
2026-10-02 11:33:42 +02:00
parent f9b7f2ea33
commit e06e0cc8bf
19 changed files with 870 additions and 34 deletions

View File

@@ -13,11 +13,15 @@ import (
)
func compareBodies(want, got Response, step Step) []Diff {
return compareBodiesWith(want, got, step, maskOptions{})
}
func compareBodiesWith(want, got Response, step Step, opts maskOptions) []Diff {
wantJSON := isJSONContentType(want.Headers)
gotJSON := isJSONContentType(got.Headers)
if wantJSON && gotJSON {
wantRaw, wantDiffs := normalizeJSON([]byte(want.Body), step)
gotRaw, gotDiffs := normalizeJSON([]byte(got.Body), step)
wantRaw, wantDiffs := normalizeJSON([]byte(want.Body), step, opts)
gotRaw, gotDiffs := normalizeJSON([]byte(got.Body), step, opts)
diffs := append([]Diff{}, wantDiffs...)
diffs = append(diffs, gotDiffs...)
diffs = append(diffs, diffJSON(wantRaw, gotRaw)...)