Skip to content

integration tests: Use t.Helper() #7654

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

Merged
merged 3 commits into from
Jul 29, 2019
Merged

Conversation

sapk
Copy link
Member

@sapk sapk commented Jul 29, 2019

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.

@lunny lunny added this to the 1.10.0 milestone Jul 29, 2019
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jul 29, 2019
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jul 29, 2019
@codecov-io
Copy link

codecov-io commented Jul 29, 2019

Codecov Report

Merging #7654 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7654      +/-   ##
==========================================
- Coverage   41.28%   41.28%   -0.01%     
==========================================
  Files         469      469              
  Lines       63718    63718              
==========================================
- Hits        26305    26303       -2     
- Misses      33986    33988       +2     
  Partials     3427     3427
Impacted Files Coverage Δ
modules/log/event.go 64.61% <0%> (-1.03%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 31a1fe1...c3d7862. Read the comment docs.

@lunny
Copy link
Member

lunny commented Jul 29, 2019

make L-G-T-M work

@lunny lunny merged commit d02566a into go-gitea:master Jul 29, 2019
@sapk sapk deleted the test-declare-helper branch July 29, 2019 04:18
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants