mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-20 16:36:31 +00:00
add stderr to tests
This commit is contained in:
@ -212,9 +212,11 @@ func TestSetupTrace(t *testing.T) {
|
||||
|
||||
viper.Reset()
|
||||
args := append([]string{cmd.Use}, tc.args...)
|
||||
out, err := RunCaptureWithArgs(cmd, args, tc.env)
|
||||
stdout, stderr, err := RunCaptureWithArgs(cmd, args, tc.env)
|
||||
require.NotNil(err, i)
|
||||
msg := strings.Split(out, "\n")
|
||||
require.Equal("", stdout, i)
|
||||
require.NotEqual("", stderr, i)
|
||||
msg := strings.Split(stderr, "\n")
|
||||
desired := fmt.Sprintf("ERROR: %s", tc.expected)
|
||||
assert.Equal(desired, msg[0], i)
|
||||
if tc.long && assert.True(len(msg) > 2, i) {
|
||||
|
Reference in New Issue
Block a user