RunAndExpectSuccessWithErrOut runs the given command, expects it to succeed and returns its stdout and stderr lines.
(tb testing.TB, args ...string)
| 249 | |
| 250 | // RunAndExpectSuccessWithErrOut runs the given command, expects it to succeed and returns its stdout and stderr lines. |
| 251 | func (e *CLITest) RunAndExpectSuccessWithErrOut(tb testing.TB, args ...string) (stdout, stderr []string) { |
| 252 | tb.Helper() |
| 253 | |
| 254 | stdout, stderr, err := e.Run(tb, false, args...) |
| 255 | require.NoError(tb, err, "'kopia %v' failed", strings.Join(args, " ")) |
| 256 | |
| 257 | return stdout, stderr |
| 258 | } |
| 259 | |
| 260 | // RunAndExpectFailure runs the given command, expects it to fail and returns its output lines. |
| 261 | func (e *CLITest) RunAndExpectFailure(tb testing.TB, args ...string) (stdout, stderr []string) { |