(t *testing.T, deps commandDeps, args ...string)
| 2914 | } |
| 2915 | |
| 2916 | func 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 | |
| 2930 | func executeRootCommandWithExit( |
| 2931 | t *testing.T, |
no test coverage detected