( t *testing.T, deps commandDeps, args ...string, )
| 2928 | } |
| 2929 | |
| 2930 | func 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 | |
| 2946 | func mustJSON(t *testing.T, value any) json.RawMessage { |
| 2947 | t.Helper() |
no test coverage detected