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> |
||
---|---|---|
.. | ||
gen_program_test | ||
.gitignore | ||
doc.go | ||
gen.go | ||
gen_intrinsics.go | ||
gen_program.go | ||
gen_program_expressions.go | ||
gen_program_lower.go | ||
gen_program_quotes.go | ||
gen_program_quotes_test.go | ||
gen_program_test.go | ||
gen_program_utils.go | ||
gen_resource_mappings.go | ||
gen_resource_mappings_test.go | ||
gen_test.go | ||
importer.go | ||
python.go | ||
python_test.go | ||
requirements.txt | ||
test.go | ||
utilities.go | ||
utilities_test.go |