pulumi/sdk/go/common/resource/plugin
bors[bot] b27c71f5bd
Merge #12377
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>
2023-03-10 20:33:51 +00:00
..
analyzer.go feat(engine): Adds structured alias support to the engine 2022-10-11 17:56:32 -04:00
analyzer_plugin.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
check.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
config_source.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
context.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
converter.go Add converter plugin 2023-03-09 22:16:21 +00:00
converter_plugin.go Add converter plugin 2023-03-09 22:16:21 +00:00
converter_server.go Add converter plugin 2023-03-09 22:16:21 +00:00
doc.go Provider implementer's guide draft (#6322) 2021-04-13 14:11:02 -07:00
host.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
host_server.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
langruntime.go Engine and Golang support for shimless providers 2022-11-14 11:25:41 +00:00
langruntime_plugin.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
plugin.go Add converter plugin 2023-03-09 22:16:21 +00:00
plugin_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
provider.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
provider_plugin.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
provider_plugin_test.go chore(all): Log to iotest.LogWriter from tests 2023-03-07 11:27:47 -08:00
provider_server.go Fix provider_server ID handling in Read 2023-03-10 09:44:00 -05:00
provider_server_test.go Lint 2023-03-10 12:29:07 -05:00
provider_test.go Add forward compatible UnimplementedProvider for bridge 2022-12-09 18:44:28 -08:00
provider_unimplemented.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
rpc.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
rpc_rapid_test.go deps: Upgrade to pgregory.net/rapid v0.5 2023-02-16 12:04:07 -08:00
rpc_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00