MCPcopy Create free account
hub / github.com/compozy/agh / executeRootCommandWithExit

Function executeRootCommandWithExit

internal/cli/helpers_test.go:2930–2944  ·  view source on GitHub ↗
(
	t *testing.T,
	deps commandDeps,
	args ...string,
)

Source from the content-addressed store, hash-verified

2928}
2929
2930func executeRootCommandWithExit(
2931 t *testing.T,
2932 deps commandDeps,
2933 args ...string,
2934) (int, string, string) {
2935 t.Helper()
2936
2937 stdout, stderr, err := executeRootCommand(t, deps, args...)
2938 if err != nil {
2939 var rendered bytes.Buffer
2940 rendered.WriteString(stderr)
2941 return writeExecutionError(&rendered, args, err), stdout, rendered.String()
2942 }
2943 return 0, stdout, stderr
2944}
2945
2946func mustJSON(t *testing.T, value any) json.RawMessage {
2947 t.Helper()

Calls 3

executeRootCommandFunction · 0.85
writeExecutionErrorFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected