Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #757: use stretchr/testify/require #758

Merged
merged 11 commits into from
Dec 20, 2024
Merged

Conversation

magiconair
Copy link
Member

@magiconair magiconair commented Dec 9, 2024

stretchr/testify is more strict in equality testing and provides more useful debugging output.

In a first step I've replaced all usages of verify.Values with testify and found two glitches in the variant tests.

In later steps I'll go through the if got, want pattern and gradually replace them with require as well.

@magiconair magiconair requested a review from kung-foo December 9, 2024 14:45
@magiconair magiconair added this to the v0.6.1 milestone Dec 9, 2024
@magiconair magiconair force-pushed the issue-757-stretchr-testify branch from 8438859 to 1a50af9 Compare December 10, 2024 03:59
@magiconair magiconair modified the milestones: v0.6.1, v0.6.2 Dec 10, 2024
@magiconair magiconair changed the title Issue #757: replace verify.Values with stretchr/testify/require Issue #757: use stretchr/testify/require Dec 10, 2024
@kung-foo
Copy link
Member

You've put this in the v0.6.2 milestone, but it looks like there are changes to the other PRs that are targeting v0.6.1 that also have testify updates. Do we need to have all of them target one milestone?

@magiconair
Copy link
Member Author

I changed the CodecTest to stretchr/testify in a previous commit since it allowed me to find a failing test with the nil slices. We already have two different test patterns with got, want and verify.Values. I'm trying to switch this all to require so that there is only one.

We don't need to have them all in one milestone and do them one step at a time as long as they're all converted at some point.

@magiconair magiconair force-pushed the issue-757-stretchr-testify branch 2 times, most recently from 06608c5 to 645ad93 Compare December 11, 2024 10:04
@magiconair magiconair force-pushed the issue-757-stretchr-testify branch from 4270340 to 34d14f1 Compare December 16, 2024 23:57
@magiconair magiconair merged commit ce63abd into main Dec 20, 2024
5 checks passed
@magiconair magiconair deleted the issue-757-stretchr-testify branch December 20, 2024 19:47
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.

2 participants