Assert the avatar endpoints serve images rather than byte counts - #314
Closed
paskal wants to merge 1 commit into
Closed
Assert the avatar endpoints serve images rather than byte counts#314paskal wants to merge 1 commit into
paskal wants to merge 1 commit into
Conversation
Three tests pinned the exact encoded size of a PNG the standard library produces. Go 1.27 changed the encoder, so the same picture now comes out 507 bytes where the test wanted 569, and 1633 and 1617 where it wanted 999 and 992. Nothing in this repository changed and all three fail. What the avatar path owes its caller is a decodable image within the resize limit, so that is what they check now. The byte count belongs to whichever encoder the Go release happens to ship.
Coverage Report for CI Build 32584129790Coverage remained the same at 86.05%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Collaborator
Author
|
Folding this into #315 rather than carrying a test-only PR: the same two commits are there, and the Partitioned change needs the fix to have a green CI anyway. Nothing is lost, and there is one PR to review instead of two. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three tests pin the exact encoded size of a PNG produced by the standard library. Go 1.27 changed the encoder, so the same picture now comes out at a different size and all three fail on a clean checkout with nothing in the repository changed:
TestIntegrationAvatarTestAvatar_PutIdenticonTestAvatar_PutFailedWhat the avatar path owes its caller is a decodable image within the resize limit, so that is what these check now: decode the bytes, confirm the format, and confirm the dimensions are inside
AvatarResizeLimit. The byte count belongs to whichever encoder the Go release happens to ship, and pinning it means the suite breaks on a toolchain bump rather than on a defect.Mirrored in the root module and
v2/per the project rule for shared behaviour.Two failures in
provider/(TestCustomProvider,TestDevProvider) are also present on a clean checkout but are unrelated: they are a port collision on 8084 and a hostname that resolves only in some environments. Left alone here.