Skip to content

Commit

Permalink
fixup: 🌱 Improve E2E error reporting
Browse files Browse the repository at this point in the history
The reasoning behind this change was not clear. I added a comment to
explain it.
  • Loading branch information
EduardGomezEscandell committed Nov 14, 2023
1 parent 0117243 commit 73b0fde
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions end-to-end/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ func distroIsProAttached(t *testing.T, ctx context.Context, d gowsl.Distro) (boo
var stdout, stderr bytes.Buffer

cmd := d.Command(ctx, "pro status --format=json")

// We need separate Stdout and Stderr. We cannot combine them because the
// pro client prints warnings to Stderr, which makes the combined output
// invalid JSON. We also cannot ignore either:
// - We need StdOut to parse the JSON output.
// - We need Stderr to read the error message in case the command fails.
cmd.Stdout = &stdout
cmd.Stderr = &stderr

Expand Down

0 comments on commit 73b0fde

Please sign in to comment.