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> |
||
---|---|---|
.. | ||
config | ||
plugin | ||
testing | ||
alias.go | ||
alias_test.go | ||
asset.go | ||
asset_test.go | ||
custom_timeouts.go | ||
errors.go | ||
mapper_test.go | ||
properties.go | ||
properties_diff.go | ||
properties_diff_test.go | ||
properties_path.go | ||
properties_path_test.go | ||
properties_test.go | ||
resource_goal.go | ||
resource_id.go | ||
resource_id_test.go | ||
resource_operation.go | ||
resource_state.go | ||
stack.go | ||
status.go | ||
urn.go | ||
urn_test.go |