Skip to content

pkg/fileutils: TestMatches: remove cases no longer valid for go1.16#42390

Merged
cpuguy83 merged 1 commit intomoby:masterfrom
thaJeztah:skip_defunct_test
May 20, 2021
Merged

pkg/fileutils: TestMatches: remove cases no longer valid for go1.16#42390
cpuguy83 merged 1 commit intomoby:masterfrom
thaJeztah:skip_defunct_test

Conversation

@thaJeztah
Copy link
Member

relates to #40353
fixes #41953

These tests were no longer valid on Go 1.16; related to https://tip.golang.org/doc/go1.16#path/filepath

The Match and Glob functions now return an error if the unmatched part of
the pattern has a syntax error. Previously, the functions returned early on
a failed match, and thus did not report any later syntax error in the pattern.

Causing the test to fail:

=== RUN   TestMatches
    fileutils_test.go:388: assertion failed: error is not nil: syntax error in pattern: pattern="a\\" text="a"
--- FAIL: TestMatches (0.00s)

These tests were no longer valid on Go 1.16; related to https://tip.golang.org/doc/go1.16#path/filepath

> The Match and Glob functions now return an error if the unmatched part of
> the pattern has a syntax error. Previously, the functions returned early on
> a failed match, and thus did not report any later syntax error in the pattern.

Causing the test to fail:

    === RUN   TestMatches
        fileutils_test.go:388: assertion failed: error is not nil: syntax error in pattern: pattern="a\\" text="a"
    --- FAIL: TestMatches (0.00s)

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Member Author

@tonistiigi @cpuguy83 ptal

@thaJeztah thaJeztah mentioned this pull request May 18, 2021
20 tasks
Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM

@cpuguy83 cpuguy83 merged commit 328d23f into moby:master May 20, 2021
@thaJeztah thaJeztah deleted the skip_defunct_test branch May 20, 2021 19:42
@thaJeztah thaJeztah added this to the 21.xx milestone May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TestMatches Test failing with Golang 1.16-beta1

3 participants