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

Conversation

5 participants
@zeripath
Copy link
Contributor

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.)

zeripath added some commits Apr 4, 2019

@codecov-io

This comment has been minimized.

Copy link

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 label Apr 4, 2019

@zeripath

This comment has been minimized.

Copy link
Contributor Author

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 this to the 1.9.0 milestone Apr 5, 2019

zeripath added some commits Apr 5, 2019

@lafriks

lafriks approved these changes Apr 6, 2019

@GiteaBot GiteaBot added lgtm/need 1 and removed lgtm/need 2 labels Apr 6, 2019

zeripath added some commits Apr 6, 2019

@GiteaBot GiteaBot added lgtm/done and removed lgtm/need 1 labels Apr 6, 2019

@lafriks lafriks merged commit 5422f23 into go-gitea:master Apr 7, 2019

2 checks passed

approvals/lgtm this commit looks good
continuous-integration/drone/pr Build is passing
Details

@zeripath zeripath deleted the zeripath:quiet-testing branch Apr 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.