pulumi/sdk/go/common
bors[bot] 7ef1005b86
Merge #12424
12424: sdk/common: Add testing/diagtest package r=abhinav a=abhinav

Adds a testing/diagtest package similar to
the previously added iotest package (#12377)
which writes log messages to a testing.TB's log stream.

This makes tests less noisy and helps associate error messages
with the exact test cases they came from.

diagtest, unlike iotest, prefixes each message with stdout or stderr.
To reuse iotest.LogWriter for this, we add support to iotest.LogWriter
to specify an optional prefix string.

This also updates all tests that use cmdutil.Diag directly
(because these write to the test process' stdout/stderr)
and instead use diagtest.Sink to have them write
to the test's logger.


Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
2023-03-13 20:56:43 +00:00
..
apitype all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
constant Send update metadata about update plans 2022-10-12 22:55:59 +01:00
diag all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
display Moving previewDigest to sdk/go/common/display, and exporting it. (#9886) 2022-06-27 09:08:06 -05:00
encoding all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
env Handle recursive types 2023-01-13 11:28:13 -08:00
resource Merge #12377 2023-03-10 20:33:51 +00:00
testing sdk/common: Add testing/diagtest package 2023-03-13 12:48:24 -07:00
tokens all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
tools all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
util sdk/go/common/util cleanup 2023-03-10 08:49:00 +00:00
version move pkg/version -> sdk/go/common/version 2020-03-18 15:25:25 -07:00
workspace Hardcode repo for yaml converter 2023-03-13 18:30:01 +00:00