Add unit test logging hook#3417
Merged
crosbymichael merged 2 commits intocontainerd:masterfrom Jul 16, 2019
Merged
Conversation
Member
Author
|
Looks like there is a race in golang 1.12 that I don't see in 1.11 around a |
61b1d58 to
a789cbc
Compare
|
Build succeeded.
|
mxpv
reviewed
Jul 15, 2019
log/logtest/log_hook.go
Outdated
Member
There was a problem hiding this comment.
can this be just logrus.AllLevels ?
log/logtest/log_hook.go
Outdated
Member
There was a problem hiding this comment.
I think string(bytes.Trim(s, "\n")) would be more readable.
Codecov Report
@@ Coverage Diff @@
## master #3417 +/- ##
=======================================
Coverage 45.05% 45.05%
=======================================
Files 113 113
Lines 12563 12563
=======================================
Hits 5660 5660
Misses 6049 6049
Partials 854 854
Continue to review full report at Codecov.
|
Allows log output to sent along with test output for cleaner output and clearer ordering. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Enables showing debug logs in testing output. For integration tests the client log output will show in addition to daemon output, with timestamps for better correlation. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
a789cbc to
63ceaf8
Compare
|
Build succeeded.
|
Member
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a function for configuring a context with logger which outputs to the test logs with debug level enabled. This allows for cleaner and more verbose test output with clearer ordering of logs along with failure conditions and time correlation for the daemon logs in integration tests.
Disables verbose logging by default in CI since this will cause more test log output by default. Verbose logging has little value as this output will always get shown now when the corresponding test fails.