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

Quieter Integration Tests #6513

Merged
merged 15 commits into from
Apr 7, 2019
Merged

Quieter Integration Tests #6513

merged 15 commits into from
Apr 7, 2019

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Apr 4, 2019

The integration tests produce far too much logging when they're running, so much that you cannot easily find errors.

This patch redirects the logging and adds some information to each test to print which test is running.

It requires that each integration runs PrintCurrentTest. (This has been added to prepareTestEnv.)

@codecov-io
Copy link

codecov-io commented Apr 4, 2019

Codecov Report

Merging #6513 into master will increase coverage by 0.12%.
The diff coverage is 93.01%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #6513      +/-   ##
=========================================
+ Coverage   40.27%   40.4%   +0.12%     
=========================================
  Files         403     404       +1     
  Lines       54079   54089      +10     
=========================================
+ Hits        21781   21852      +71     
+ Misses      29279   29224      -55     
+ Partials     3019    3013       -6
Impacted Files Coverage Δ
modules/log/flags.go 100% <100%> (ø)
modules/setting/setting.go 48.16% <100%> (-0.38%) ⬇️
modules/log/smtp.go 89.36% <100%> (ø) ⬆️
modules/setting/log.go 73.48% <100%> (+9.85%) ⬆️
modules/log/file.go 75.52% <100%> (ø) ⬆️
modules/log/conn.go 96.55% <100%> (ø) ⬆️
modules/log/colors.go 66.9% <37.5%> (+5.83%) ⬆️
modules/log/console.go 75% <66.66%> (ø) ⬆️
modules/log/writer.go 97.39% <97.39%> (ø)
models/unit.go 0% <0%> (-14.29%) ⬇️
... and 10 more

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 7ed65a9...b843d8b. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 4, 2019
@zeripath
Copy link
Contributor Author

zeripath commented Apr 4, 2019

On test failure the logs will be outputted Unfortunately they will be prefixed with a reference to the new wrapped logger, but I'm not sure there's a way to avoid this without rewriting the go testframework.

@zeripath zeripath added topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile type/testing labels Apr 5, 2019
@zeripath zeripath added this to the 1.9.0 milestone Apr 5, 2019
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 6, 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 Apr 6, 2019
@lafriks lafriks merged commit 5422f23 into go-gitea:master Apr 7, 2019
@zeripath zeripath deleted the quiet-testing branch April 7, 2019 10:56
@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. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile type/testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants