integration tests: Use t.Helper() #7654
Merged
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.
This PR declare the helper state of some fucntions used in testing. This will improve a little test logs by reporting the error at line of the calling function.
For example, if the test failed because of wrong response code at https://github.com/go-gitea/gitea/blob/master/integrations/api_admin_org_test.go#L33 by calling
MakeRequest
it would return this exact same line and not https://github.com/go-gitea/gitea/blob/master/integrations/integration_test.go#L340. We still have the full call stack in details.