fix(golang-github-clbanning-mxj): enable %check by removing broken example tests#15943
Open
dmcilvaney wants to merge 1 commit intomicrosoft:tomls/base/mainfrom
Open
Conversation
…ample tests The upstream example_test.go at v2.5.5 references v1 API identifiers (HandleXmlReader, HandleJsonReader, Map, etc.) that were removed in v2. This causes Go test compilation failures: ./example_test.go:19:1: ExampleHandleXmlReader refers to unknown identifier: HandleXmlReader ./example_test.go:151:1: ExampleMap_Struct refers to unknown identifier: Map Fedora's spec (f43, rawhide) ships v2.5.5 with %check enabled but doesn't exclude the broken tests. The issue is fixed upstream in v2.7.0 where the example functions were updated to use v2 imports and commented out: clbanning/mxj@458e5dc Rather than skipping %check entirely, add an overlay to remove only the broken example_test.go during %prep, allowing the real unit tests to run. Tested: Built successfully with %check passing, verified package installs and Go source files are present in /usr/share/gocode/src/github.com/clbanning/mxj/
Contributor
There was a problem hiding this comment.
Pull request overview
Enables %check for golang-github-clbanning-mxj by replacing a blanket test skip with a targeted overlay that removes a known-broken upstream example_test.go (v2.5.5 uses v1 API identifiers), allowing the real unit tests to run.
Changes:
- Remove the component-level
%checkskip configuration. - Add a
%prepoverlay to deleteexample_test.goprior to running tests. - Document upstream cause and reference the upstream fix commit (v2.7.0).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
The upstream example_test.go at v2.5.5 references v1 API identifiers (HandleXmlReader, HandleJsonReader, Map, etc.) that were removed in v2. This causes Go test compilation failures:
./example_test.go:19:1: ExampleHandleXmlReader refers to unknown identifier: HandleXmlReader
./example_test.go:151:1: ExampleMap_Struct refers to unknown identifier: Map
Fedora's spec (f43, rawhide) ships v2.5.5 with %check enabled but doesn't exclude the broken tests. The issue is fixed upstream in v2.7.0 where the example functions were updated to use v2 imports and commented out: clbanning/mxj@458e5dc
Rather than skipping %check entirely, add an overlay to remove only the broken example_test.go during %prep, allowing the real unit tests to run.
Tested: Built successfully with %check passing, verified package installs and Go source files are present in /usr/share/gocode/src/github.com/clbanning/mxj/