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

Add a missing name to the *testing.T argument. #425

Merged
merged 1 commit into from Dec 13, 2021
Merged

Add a missing name to the *testing.T argument. #425

merged 1 commit into from Dec 13, 2021

Conversation

nerdatmath
Copy link
Contributor

@nerdatmath nerdatmath commented Dec 11, 2021

When using t.Run, the subtest must take a named *testing.T argument. Otherwise, inner calls to t.Error etc. are invoked on the outer test object, which is pretty much always wrong.

@discordianfish please review.

When using t.Run, the subtest must take a named *testing.T argument. Otherwise, inner calls to t.Error etc. are invoked on the outer test object, which is pretty much always wrong.

Signed-off-by: Matt Harden <matt.harden@gmail.com>
Copy link
Member

@discordianfish discordianfish left a comment

Choose a reason for hiding this comment

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

Good catch, thanks!

@SuperQ SuperQ merged commit 5bd7067 into prometheus:master Dec 13, 2021
@nerdatmath nerdatmath deleted the patch-1 branch February 18, 2022 06:54
remijouannet pushed a commit to remijouannet/procfs that referenced this pull request Oct 20, 2022
When using t.Run, the subtest must take a named *testing.T argument. Otherwise, inner calls to t.Error etc. are invoked on the outer test object, which is pretty much always wrong.

Signed-off-by: Matt Harden <matt.harden@gmail.com>
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.

None yet

3 participants