MCPcopy
hub / github.com/kopia/kopia / RunAndProcessStderr

Method RunAndProcessStderr

tests/testenv/cli_test_env.go:176–185  ·  view source on GitHub ↗

RunAndProcessStderr runs the given command, and streams its stderr line-by-line to stderrCallback until it returns false.

(tb testing.TB, stderrCallback func(line string) bool, args ...string)

Source from the content-addressed store, hash-verified

174
175// RunAndProcessStderr runs the given command, and streams its stderr line-by-line to stderrCallback until it returns false.
176func (e *CLITest) RunAndProcessStderr(tb testing.TB, stderrCallback func(line string) bool, args ...string) (wait func() error, kill func()) {
177 tb.Helper()
178
179 wait, interrupt := e.RunAndProcessStderrInt(tb, stderrCallback, nil, args...)
180 kill = func() {
181 interrupt(os.Kill)
182 }
183
184 return wait, kill
185}
186
187// RunAndProcessStderrAsync runs the given command, and streams its stderr line-by-line stderrCallback until it returns false.
188func (e *CLITest) RunAndProcessStderrAsync(tb testing.TB, stderrCallback func(line string) bool, stderrAsyncCallback func(line string), args ...string) (wait func() error, kill func()) {

Callers 15

TestServerControlFunction · 0.95
TestServerControlUDSFunction · 0.95
testAPIServerRepositoryFunction · 0.95
TestACLFunction · 0.95
TestServerStartFunction · 0.95
TestServerSchedulingFunction · 0.95

Calls 2

HelperMethod · 0.80

Tested by 15

TestServerControlFunction · 0.76
TestServerControlUDSFunction · 0.76
testAPIServerRepositoryFunction · 0.76
TestACLFunction · 0.76
TestServerStartFunction · 0.76
TestServerSchedulingFunction · 0.76