mirror of https://github.com/pulumi/pulumi.git
b27c71f5bd
12377: sdk/go: Add common/testing/iotest package r=abhinav a=abhinav Adds a new iotest subpackage to the common/testing package and moves the testLogWriter used in a prior integration test into this directory. The new API is: package iotest func LogWriter(testing.TB) io.Writer This is a generally useful utility in any test that needs an io.Writer, where we want them to not pollute actual stdout or stderr. There are a few direct uses of os.Stderr and os.Stdout in our tests. The second commit switches these to use iotest.LogWriter where appropriate, Uses of os.Stdout/Stderr that were omitted: - Example tests: These don't have a testing.TB to log to. - pulumi/main_test: Replaces the global os.Stdout/Stderr in TestMain. LogWriter isn't relevant there. Co-authored-by: Abhinav Gupta <abhinav@pulumi.com> |
||
---|---|---|
.. | ||
analyzer.go | ||
analyzer_plugin.go | ||
check.go | ||
config_source.go | ||
context.go | ||
converter.go | ||
converter_plugin.go | ||
converter_server.go | ||
doc.go | ||
host.go | ||
host_server.go | ||
langruntime.go | ||
langruntime_plugin.go | ||
plugin.go | ||
plugin_test.go | ||
provider.go | ||
provider_plugin.go | ||
provider_plugin_test.go | ||
provider_server.go | ||
provider_server_test.go | ||
provider_test.go | ||
provider_unimplemented.go | ||
rpc.go | ||
rpc_rapid_test.go | ||
rpc_test.go |