RunAndExpectSuccess runs the given command, expects it to succeed and returns its output lines.
(tb testing.TB, args ...string)
| 114 | |
| 115 | // RunAndExpectSuccess runs the given command, expects it to succeed and returns its output lines. |
| 116 | func (e *CLITest) RunAndExpectSuccess(tb testing.TB, args ...string) []string { |
| 117 | tb.Helper() |
| 118 | |
| 119 | stdout, _, err := e.Run(tb, false, args...) |
| 120 | require.NoError(tb, err, "'kopia %v' failed", strings.Join(args, " ")) |
| 121 | |
| 122 | return stdout |
| 123 | } |
| 124 | |
| 125 | // TweakFile writes a xor-ed byte at a random point in a file. Used to simulate file corruption. |
| 126 | func (e *CLITest) TweakFile(tb testing.TB, dirn, fglob string) { |