Skip to content

Comments

fix(golang-github-clbanning-mxj): enable %check by removing broken example tests#15943

Open
dmcilvaney wants to merge 1 commit intomicrosoft:tomls/base/mainfrom
dmcilvaney:damcilva/4.0/pkg_fixes/clbanning-mxj
Open

fix(golang-github-clbanning-mxj): enable %check by removing broken example tests#15943
dmcilvaney wants to merge 1 commit intomicrosoft:tomls/base/mainfrom
dmcilvaney:damcilva/4.0/pkg_fixes/clbanning-mxj

Conversation

@dmcilvaney
Copy link
Contributor

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/

…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/
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 %check skip configuration.
  • Add a %prep overlay to delete example_test.go prior 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant