pulumi/sdk/go/common/resource
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
..
config all: Drop //nolint:goconst 2023-03-09 11:15:21 -08:00
plugin Merge #12377 2023-03-10 20:33:51 +00:00
testing deps: Upgrade to pgregory.net/rapid v0.5 2023-02-16 12:04:07 -08:00
alias.go feat(engine): Adds structured alias support to the engine 2022-10-11 17:56:32 -04:00
alias_test.go feat(engine): Adds structured alias support to the engine 2022-10-11 17:56:32 -04:00
asset.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
asset_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
custom_timeouts.go move pkg/resource -> sdk/go/common/resource, but leave nested resource packages 2020-03-18 13:36:19 -07:00
errors.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
mapper_test.go Allow decoding *asset and *archive values 2022-10-17 13:28:13 -07:00
properties.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
properties_diff.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
properties_diff_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
properties_path.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
properties_path_test.go Fix concurrent access to PropertyValue in TestPropertyPath (#9553) 2022-05-05 14:38:17 +01:00
properties_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
resource_goal.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
resource_id.go sdk/go: Prefer contract.Assertf over Assert 2023-02-15 10:22:43 -08:00
resource_id_test.go all: Drop //nolint:goconst 2023-03-09 11:15:21 -08:00
resource_operation.go move pkg/resource -> sdk/go/common/resource, but leave nested resource packages 2020-03-18 13:36:19 -07:00
resource_state.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
stack.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
status.go move pkg/resource -> sdk/go/common/resource, but leave nested resource packages 2020-03-18 13:36:19 -07:00
urn.go ci: gofmt 1.18+ clean 2022-09-21 09:48:39 -07:00
urn_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00