Do report stdout and stderr in case of failure (#8055)

* Do report stdout and stderr in case of failure

* PR feedback
This commit is contained in:
Anton Tayanovskyy 2021-09-24 19:25:30 +00:00 committed by GitHub
parent 3027d01f25
commit e14f74fbe7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -335,8 +335,7 @@ func RunCommand(t *testing.T, name string, cwd string, exec string, args ...stri
append([]string{exec}, args...),
wd,
&cmdOptions)
require.NoError(t, err)
if err != nil {
if !assert.NoError(t, err) {
stdout := stdout.String()
stderr := stderr.String()
if len(stdout) > 0 {