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

Stop overriding log output in plugin.Serve in tests #666

Merged
merged 1 commit into from
Dec 18, 2020

Conversation

paddycarver
Copy link
Contributor

@paddycarver paddycarver commented Dec 18, 2020

When testing, we don't want to override where log output gets sent--the
test framework takes care of that itself. go-plugin has disabled its use
of log.SetOutput for us, but #639 introduced a log.SetOutput in
plugin.Serve. This adds a plugin.ServeOpt property to disable that
log.SetOutput call so we can finally have tests where log lines don't
randomly show up in test output.

When testing, we don't want to override where log output gets sent--the
test framework takes care of that itself. go-plugin has disabled its use
of log.SetOutput for us, but #639 introduced a log.SetOutput in
plugin.Serve. This adds a plugin.ServeOpt property to disable that
log.SetOutput call so we can finally have tests where log lines don't
randomly show up in test output.
@paddycarver paddycarver changed the title Set logging output correctly. Stop overriding log output in plugin.Serve in tests Dec 18, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good locally!

@paddycarver paddycarver merged commit def5710 into master Dec 18, 2020
@paddycarver paddycarver deleted the paddy_test_logging branch December 18, 2020 23:22
@ghost
Copy link

ghost commented Jan 18, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Jan 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants