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

Function executeRootCommand

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

Source from the content-addressed store, hash-verified

2914}
2915
2916func executeRootCommand(t *testing.T, deps commandDeps, args ...string) (string, string, error) {
2917 t.Helper()
2918
2919 cmd := newRootCommand(deps)
2920 var stdout bytes.Buffer
2921 var stderr bytes.Buffer
2922 cmd.SetOut(&stdout)
2923 cmd.SetErr(&stderr)
2924 cmd.SetArgs(args)
2925
2926 err := cmd.ExecuteContext(testutil.Context(t))
2927 return stdout.String(), stderr.String(), err
2928}
2929
2930func executeRootCommandWithExit(
2931 t *testing.T,

Calls 3

ContextFunction · 0.92
newRootCommandFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected