GO-7542 Fix v1 proto comparison and mp3 fixture unit-test failures - #3300
Merged
Merged
Conversation
Account.JsonApiStatus and its Event.Message member are a live account event reporting the local API bind outcome, not part of the canonical AnyBlock v1 format, so TestV1ProtosMatchAnyBlockCanonicalSources failed on develop after #3297. Exclude exactly those declarations, like the account-recovery stream, so any other drift still fails.
Event.Pubsub.Message (GO-7368, PR #3298) is ephemeral client-to-client traffic delivered only to live subscribers and never persisted, so it is not part of the canonical AnyBlock v1 format. Exclude exactly its Event.Message member and the Event.Pubsub namespace ahead of that branch landing; the exclusion is a no-op until then.
mimetype v1.4.15 (pulled in by ipfs/boxo v0.43.0 on the GO-7368 branch) validates the ID3v2 header and rejects a zero-size tag, so the fixture was detected as application/octet-stream. A real ID3v2 tag always holds at least one frame; declare a non-zero size so the test passes on both mimetype versions.
Coverage provided by https://github.com/seriousben/go-patch-cover-action |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes the unit-test failures on develop (since #3297) and on #3298.
TestV1ProtosMatchAnyBlockCanonicalSources/events.proto: Heart'sevents.protomust match AnyBlock's canonical v1 source except for explicitly excluded Heart-only live-API declarations.Account.JsonApiStatus(accountJsonApiStatus = 207, from GO-7542 Report JSON API listen/bind status via event and RPC response #3297) was never excluded, so develop has failed this test since that merge.Event.Pubsub.Message(pubsubMessage = 148, from GO-7368 Add ephemeral pubsub and API v2 chat status #3298) needs the same treatment.TestDetectFileType/mp3_file_detected_as_audio: GO-7368 Add ephemeral pubsub and API v2 chat status #3298 bumpsipfs/boxoto v0.43.0, which requiresgabriel-vasile/mimetypev1.4.15. That version validates the ID3v2 header and rejects a zero-size tag, and the test fixture declared size 0. The fixture now declares a non-zero size (real ID3v2 tags always contain at least one frame) and passes on both mimetype versions.Testing
go test ./pkg/lib/anyblockjson/ ./core/files/fileuploader/passes on this branch.37bea3596).