MCPcopy Index your code
hub / github.com/kopia/kopia / RunAndVerifyOutputLineCount

Method RunAndVerifyOutputLineCount

tests/testenv/cli_test_env.go:273–280  ·  view source on GitHub ↗

RunAndVerifyOutputLineCount runs the given command and asserts it returns the given number of output lines, then returns them.

(tb testing.TB, wantLines int, args ...string)

Source from the content-addressed store, hash-verified

271
272// RunAndVerifyOutputLineCount runs the given command and asserts it returns the given number of output lines, then returns them.
273func (e *CLITest) RunAndVerifyOutputLineCount(tb testing.TB, wantLines int, args ...string) []string {
274 tb.Helper()
275
276 lines := e.RunAndExpectSuccess(tb, args...)
277 require.Len(tb, lines, wantLines, "unexpected output lines for 'kopia %v', lines:\n %s", strings.Join(args, " "), strings.Join(lines, "\n "))
278
279 return lines
280}
281
282func (e *CLITest) cmdArgs(args []string) []string {
283 var suffix []string

Callers 10

TestLogsCommandsFunction · 0.95
TestLogsMaintenanceFunction · 0.95
TestSnapshotGCMethod · 0.95
TestIndexOptimizeMethod · 0.95
TestFullMaintenanceMethod · 0.95
TestSnapshotMigrateMethod · 0.95
TestIndexRecoverMethod · 0.95

Calls 3

RunAndExpectSuccessMethod · 0.95
HelperMethod · 0.80
LenMethod · 0.45

Tested by 10

TestLogsCommandsFunction · 0.76
TestLogsMaintenanceFunction · 0.76
TestSnapshotGCMethod · 0.76
TestIndexOptimizeMethod · 0.76
TestFullMaintenanceMethod · 0.76
TestSnapshotMigrateMethod · 0.76
TestIndexRecoverMethod · 0.76